diff options
author | Jesper Juhl <[email protected]> | 2010-12-31 11:18:48 -0800 |
---|---|---|
committer | David S. Miller <[email protected]> | 2010-12-31 11:18:48 -0800 |
commit | f7e4c9775ea648deed4a8193951e50d0c7706173 (patch) | |
tree | 552432919518946318a2fcec90365f4f5006cf8e /net/unix/sysctl_net_unix.c | |
parent | 2393c944d5d60eedaede80273ede8a816b5fa3e0 (diff) |
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 <[email protected]> for suggesting a better
implementation than my initial version.
Signed-off-by: Jesper Juhl <[email protected]>
Acked-by: Michael Chan <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'net/unix/sysctl_net_unix.c')
0 files changed, 0 insertions, 0 deletions