summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorIlpo Järvinen <ilpo.jarvinen@helsinki.fi>2008-10-22 19:41:29 +0200
committerGreg Kroah-Hartman <gregkh@suse.de>2008-10-25 14:32:41 -0700
commit2abb966556649d871174343386ad71b78e12a47a (patch)
tree1eb89bd81a1ca2c76d2d7391550963d61e4d2887 /net
parentc903fcb8747d4b8c2af95e058877e106da23e82a (diff)
downloadlinux-stable-2abb966556649d871174343386ad71b78e12a47a.tar.gz
linux-stable-2abb966556649d871174343386ad71b78e12a47a.tar.bz2
linux-stable-2abb966556649d871174343386ad71b78e12a47a.zip
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>
Diffstat (limited to 'net')
-rw-r--r--net/ipv4/netfilter/nf_nat_snmp_basic.c1
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 ffeaffc3fffe..8303e4b406c0 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__);