2.4.36-stable kernel tree
修订版 | 311062f20565862e7e57c75f85a07084e562633b (tree) |
---|---|
时间 | 2008-11-09 23:06:09 |
作者 | |
Commiter | Willy Tarreau |
netfilter: snmp nat leaks memory in case of failure
(backport of 2.6 commit 311670f3ea90115f2f1840e3e9770ed71e06e6c3)
Signed-off-by: Ilpo J舐vinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
[ w@1wt.eu: file is ip_nat_snmp_basic.c in 2.4 ]
Signed-off-by: Willy Tarreau <w@1wt.eu>
@@ -740,6 +740,7 @@ static unsigned char snmp_object_decode(struct asn1_ctx *ctx, | ||
740 | 740 | *obj = kmalloc(sizeof(struct snmp_object) + len, |
741 | 741 | GFP_ATOMIC); |
742 | 742 | if (*obj == NULL) { |
743 | + kfree(p); | |
743 | 744 | kfree(id); |
744 | 745 | if (net_ratelimit()) |
745 | 746 | printk("OOM in bsalg (%d)\n", __LINE__); |