]> git.karo-electronics.de Git - linux-beck.git/commit
bnx2x: fix mem leak when command is unknown
authorJesper Juhl <jj@chaosbits.net>
Tue, 31 Jul 2012 11:39:37 +0000 (11:39 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 2 Aug 2012 07:19:17 +0000 (00:19 -0700)
commit8b6d5c09bc0c49aea041486d77c2f67e98ae0bc3
tree41f7f5a284019ff2c4f2cc31877dd947d27796f1
parente3c0d04750751389d5116267f8cf4687444d9a50
bnx2x: fix mem leak when command is unknown

In bnx2x_mcast_enqueue_cmd() we'll leak the memory allocated to
'new_cmd' if we hit the deafault case of the 'switch (cmd)'.
Add a 'kfree(new_cmd)' to that case to avoid the leak.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Acked-by: Dmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c