: SNMP NAT: fix memleak in snmp_object_decode
Subsystems (2)
PATCH 3/3 : SNMP NAT: fix memleak in snmp_object_decode
[NETFILTER]: SNMP NAT: fix memleak in snmp_object_decode
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]>
---
commit 3eb1830bb0cf13f1e9906e96b6b21d512adfbafd
tree afc2fb8b065ed275e4c5d6680858a62126b34f8b
parent e79f105111e9a6088868a879934d0574ce6230ad
author Chris Wright <[email protected]> Tue, 23 May 2006 11:23:17 +0200 committer Patrick McHardy <[email protected]> Tue, 23 May 2006 11:23:17 +0200
net/ipv4/netfilter/ip_nat_snmp_basic.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
net/ipv4/netfilter/ip_nat_snmp_basic.c +1 -0
@@ -768,6 +768,7 @@ static unsigned char snmp_object_decode( 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__);