diff options
author | Ilpo Järvinen <ilpo.jarvinen@helsinki.fi> | 2008-10-20 06:33:24 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-10-20 06:33:24 -0400 |
commit | 311670f3ea90115f2f1840e3e9770ed71e06e6c3 (patch) | |
tree | c17fe256a1a3c6dde687b7093666ecaad030b3be /net/ipv4 | |
parent | 6def1eb48101600884ebed56de03041fadc7a985 (diff) |
netfilter: snmp nat leaks memory in case of failure
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4')
-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 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, | |||
742 | *obj = kmalloc(sizeof(struct snmp_object) + len, | 742 | *obj = kmalloc(sizeof(struct snmp_object) + len, |
743 | GFP_ATOMIC); | 743 | GFP_ATOMIC); |
744 | if (*obj == NULL) { | 744 | if (*obj == NULL) { |
745 | kfree(p); | ||
745 | kfree(id); | 746 | kfree(id); |
746 | if (net_ratelimit()) | 747 | if (net_ratelimit()) |
747 | printk("OOM in bsalg (%d)\n", __LINE__); | 748 | printk("OOM in bsalg (%d)\n", __LINE__); |