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:
4d942d8
)
[NETFILTER]: SNMP NAT: fix memleak in snmp_object_decode
author
Chris Wright
<
[email protected]
>
Tue, 23 May 2006 22:08:13 +0000
(15:08 -0700)
committer
David S. Miller
<
[email protected]
>
Tue, 23 May 2006 22:15:13 +0000
(15:15 -0700)
If kmalloc fails, error path leaks data allocated from asn1_oid_decode().
Signed-off-by: Chris Wright <
[email protected]
>
Signed-off-by: Patrick McHardy <
[email protected]
>
Signed-off-by: David S. Miller <
[email protected]
>
net/ipv4/netfilter/ip_nat_snmp_basic.c
patch
|
blob
|
history
diff --git
a/net/ipv4/netfilter/ip_nat_snmp_basic.c
b/net/ipv4/netfilter/ip_nat_snmp_basic.c
index 688a2f29fadf67612805db5f73354b5afa2a3d76..c33244263b9035a688c73816487a89c4a5381d62 100644
(file)
--- a/
net/ipv4/netfilter/ip_nat_snmp_basic.c
+++ b/
net/ipv4/netfilter/ip_nat_snmp_basic.c
@@
-768,6
+768,7
@@
static unsigned char snmp_object_decode(struct asn1_ctx *ctx,
len *= sizeof(unsigned long);
*obj = kmalloc(sizeof(struct snmp_object) + len, GFP_ATOMIC);
if (*obj == NULL) {
+ kfree(lp);
kfree(id);
if (net_ratelimit())
printk("OOM in bsalg (%d)\n", __LINE__);