summaryrefslogtreecommitdiff
path: root/drivers/net/tg3.c
diff options
context:
space:
mode:
authorJesper Juhl <jj@chaosbits.net>2010-12-31 19:18:48 (GMT)
committerDavid S. Miller <davem@davemloft.net>2010-12-31 19:18:48 (GMT)
commitf7e4c9775ea648deed4a8193951e50d0c7706173 (patch)
tree552432919518946318a2fcec90365f4f5006cf8e /drivers/net/tg3.c
parent2393c944d5d60eedaede80273ede8a816b5fa3e0 (diff)
downloadlinux-fsl-qoriq-f7e4c9775ea648deed4a8193951e50d0c7706173.tar.xz
Broadcom CNIC core network driver: fix mem leak on allocation failures in cnic_alloc_uio_rings()
We are leaking memory in drivers/net/cnic.c::cnic_alloc_uio_rings() if either of the calls to dma_alloc_coherent() fail. This patch fixes it by freeing both the memory allocated with kzalloc() and memory allocated with previous calls to dma_alloc_coherent() when there's a failure. Thanks to Joe Perches <joe@perches.com> for suggesting a better implementation than my initial version. Signed-off-by: Jesper Juhl <jj@chaosbits.net> Acked-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/tg3.c')
0 files changed, 0 insertions, 0 deletions