• R/O
  • HTTP
  • SSH
  • HTTPS

linux-2.4.36: 提交

2.4.36-stable kernel tree


Commit MetaInfo

修订版311062f20565862e7e57c75f85a07084e562633b (tree)
时间2008-11-09 23:06:09
作者
CommiterWilly Tarreau

Log Message

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>

更改概述

差异

--- a/net/ipv4/netfilter/ip_nat_snmp_basic.c
+++ b/net/ipv4/netfilter/ip_nat_snmp_basic.c
@@ -740,6 +740,7 @@ static unsigned char snmp_object_decode(struct asn1_ctx *ctx,
740740 *obj = kmalloc(sizeof(struct snmp_object) + len,
741741 GFP_ATOMIC);
742742 if (*obj == NULL) {
743+ kfree(p);
743744 kfree(id);
744745 if (net_ratelimit())
745746 printk("OOM in bsalg (%d)\n", __LINE__);
Show on old repository browser