Commit 311670f3 authored by Ilpo Järvinen's avatar Ilpo Järvinen Committed by David S. Miller

netfilter: snmp nat leaks memory in case of failure

Signed-off-by: default avatarIlpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: default avatarPatrick McHardy <kaber@trash.net>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 6def1eb4
...@@ -742,6 +742,7 @@ static unsigned char snmp_object_decode(struct asn1_ctx *ctx, ...@@ -742,6 +742,7 @@ static unsigned char snmp_object_decode(struct asn1_ctx *ctx,
*obj = kmalloc(sizeof(struct snmp_object) + len, *obj = kmalloc(sizeof(struct snmp_object) + len,
GFP_ATOMIC); GFP_ATOMIC);
if (*obj == NULL) { if (*obj == NULL) {
kfree(p);
kfree(id); kfree(id);
if (net_ratelimit()) if (net_ratelimit())
printk("OOM in bsalg (%d)\n", __LINE__); printk("OOM in bsalg (%d)\n", __LINE__);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment