diff options
author | Ilpo Järvinen <ilpo.jarvinen@helsinki.fi> | 2008-10-22 19:41:29 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2008-11-10 10:50:08 -0800 |
commit | 1f1b1c633ad952ea13eb36a09c6edb4748967d07 (patch) | |
tree | 483f7ca2dcf41d0cd2e5324716ad6d349753ca21 | |
parent | 78d7a1672fd0191d0acd079015133da2a62f7439 (diff) |
netfilter: snmp nat leaks memory in case of failure
netfilter: snmp nat leaks memory in case of failure
Upstream commit 311670f3e:
Signed-off-by: Ilpo Jarvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: Patrick McHardy <kaber@trash.net>
-rw-r--r-- | net/ipv4/netfilter/nf_nat_snmp_basic.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/net/ipv4/netfilter/nf_nat_snmp_basic.c b/net/ipv4/netfilter/nf_nat_snmp_basic.c index 8e4148d3951..1b0a7386299 100644 --- a/net/ipv4/netfilter/nf_nat_snmp_basic.c +++ b/net/ipv4/netfilter/nf_nat_snmp_basic.c @@ -742,6 +742,7 @@ static unsigned char snmp_object_decode(struct asn1_ctx *ctx, *obj = kmalloc(sizeof(struct snmp_object) + len, GFP_ATOMIC); if (*obj == NULL) { + kfree(p); kfree(id); if (net_ratelimit()) printk("OOM in bsalg (%d)\n", __LINE__); |