Re: [PATCH] bnx2x: fix mem leak when command is unknown

2012-08-02 Thread David Miller
From: Jesper Juhl Date: Tue, 31 Jul 2012 23:39:37 +0200 (CEST) > 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 Applied. -- To

Re: [PATCH] bnx2x: fix mem leak when command is unknown

2012-08-01 Thread Dmitry Kravkov
On Tue, 2012-07-31 at 23:39 +0200, Jesper Juhl wrote: > 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 > --- > drivers/net/ether

[PATCH] bnx2x: fix mem leak when command is unknown

2012-07-31 Thread Jesper Juhl
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 --- drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c | 1 + 1 file changed, 1 insertion(+)