projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e3c0d04
)
bnx2x: fix mem leak when command is unknown
author
Jesper Juhl
<
[email protected]
>
Tue, 31 Jul 2012 11:39:37 +0000
(11:39 +0000)
committer
David S. Miller
<
[email protected]
>
Thu, 2 Aug 2012 07:19:17 +0000
(
00:19
-0700)
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 <
[email protected]
>
Acked-by: Dmitry Kravkov <
[email protected]
>
Signed-off-by: David S. Miller <
[email protected]
>
drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c
patch
|
blob
|
history
diff --git
a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c
b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c
index 734fd87cd99093e0d30899006cb12cacd10a027c..62f754bd0dfe65704a1af826a754a720dc8cfd43 100644
(file)
--- a/
drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c
+++ b/
drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c
@@
-2485,6
+2485,7
@@
static int bnx2x_mcast_enqueue_cmd(struct bnx2x *bp,
break;
default:
+ kfree(new_cmd);
BNX2X_ERR("Unknown command: %d\n", cmd);
return -EINVAL;
}