summaryrefslogtreecommitdiffstats
path: root/drivers/net/tg3.c
diff options
context:
space:
mode:
authorJesper Juhl <jj@chaosbits.net>2010-12-31 20:18:48 +0100
committerDavid S. Miller <davem@davemloft.net>2010-12-31 20:18:48 +0100
commitf7e4c9775ea648deed4a8193951e50d0c7706173 (patch)
tree552432919518946318a2fcec90365f4f5006cf8e /drivers/net/tg3.c
parentISDN, Gigaset: Fix memory leak in do_disconnect_req() (diff)
downloadlinux-f7e4c9775ea648deed4a8193951e50d0c7706173.tar.xz
linux-f7e4c9775ea648deed4a8193951e50d0c7706173.zip
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 '')
0 files changed, 0 insertions, 0 deletions