Commit 27caba5c authored by Ilpo Järvinen's avatar Ilpo Järvinen Committed by Greg Kroah-Hartman

netfilter: snmp nat leaks memory in case of failure

netfilter: snmp nat leaks memory in case of failure

Upstream commit 311670f3:
Signed-off-by: default avatarIlpo Jarvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: default avatarPatrick McHardy <kaber@trash.net>
parent 2eac9443
...@@ -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