Linux Netfilter development
 help / color / mirror / Atom feed
From: Patrick McHardy <kaber@trash.net>
To: stable@kernel.org
Cc: Patrick McHardy <kaber@trash.net>,
	netfilter-devel@vger.kernel.org, davem@davemloft.net
Subject: netfilter 02/03: snmp nat leaks memory in case of failure
Date: Wed, 22 Oct 2008 19:41:29 +0200 (MEST)	[thread overview]
Message-ID: <20081022174129.21341.93881.sendpatchset@x2.localnet> (raw)
In-Reply-To: <20081022174126.21341.38231.sendpatchset@x2.localnet>

commit 6339355779208471ab254e13f31aa0d3217ee6fd
Author: Patrick McHardy <kaber@trash.net>
Date:   Wed Oct 22 19:34:40 2008 +0200

    netfilter: snmp nat leaks memory in case of failure
    
    Upstream commit 311670f3e:
    
    Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
    Signed-off-by: Patrick McHardy <kaber@trash.net>

diff --git a/net/ipv4/netfilter/nf_nat_snmp_basic.c b/net/ipv4/netfilter/nf_nat_snmp_basic.c
index ffeaffc..8303e4b 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,
 			*obj = kmalloc(sizeof(struct snmp_object) + len,
 				       GFP_ATOMIC);
 			if (*obj == NULL) {
+				kfree(p);
 				kfree(id);
 				if (net_ratelimit())
 					printk("OOM in bsalg (%d)\n", __LINE__);
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2008-10-22 17:41 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-22 17:41 netfilter 00/03: netfilter -stable fixes Patrick McHardy
2008-10-22 17:41 ` netfilter 01/03: xt_iprange: fix range inversion match Patrick McHardy
2008-10-22 17:41 ` Patrick McHardy [this message]
2008-10-22 17:41 ` netfilter 03/03: restore lost ifdef guarding defrag exception Patrick McHardy
2008-10-24  0:31 ` netfilter 00/03: netfilter -stable fixes Krzysztof Oledzki
2008-10-24  3:40   ` Patrick McHardy
2008-10-28  2:13     ` Krzysztof Oledzki
2008-10-28  2:45       ` Greg KH

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20081022174129.21341.93881.sendpatchset@x2.localnet \
    --to=kaber@trash.net \
    --cc=davem@davemloft.net \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=stable@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox