netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] iptables: missing free() in function delete_entry()
@ 2012-03-08 14:20 Christian Engelmayer
  2012-03-12 12:13 ` Pablo Neira Ayuso
  0 siblings, 1 reply; 2+ messages in thread
From: Christian Engelmayer @ 2012-03-08 14:20 UTC (permalink / raw)
  To: netfilter-devel; +Cc: christian.engelmayer, franz.flasch

From: Franz Flasch <franz.flasch@frequentis.com>

Fixed a memory leak in the dry run path of function delete_entry().

Signed-off-by: Franz Flasch <franz.flasch@frequentis.com>
Signed-off-by: Christian Engelmayer <christian.engelmayer@frequentis.com>
---

--- iptables-1.4.12.2/libiptc/libiptc.c	2012-01-02 18:19:09.000000000 +0100
+++ iptables-1.4.12.2-modified/libiptc/libiptc.c	2012-03-08 14:27:24.000000000 +0100
@@ -2001,8 +2001,10 @@ static int delete_entry(const IPT_CHAINL
 			continue;
 
 		/* if we are just doing a dry run, we simply skip the rest */
-		if (dry_run)
+		if (dry_run){
+			free(r);
 			return 1;
+		}
 
 		/* If we are about to delete the rule that is the
 		 * current iterator, move rule iterator back.  next

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] iptables: missing free() in function delete_entry()
  2012-03-08 14:20 [PATCH] iptables: missing free() in function delete_entry() Christian Engelmayer
@ 2012-03-12 12:13 ` Pablo Neira Ayuso
  0 siblings, 0 replies; 2+ messages in thread
From: Pablo Neira Ayuso @ 2012-03-12 12:13 UTC (permalink / raw)
  To: Christian Engelmayer; +Cc: netfilter-devel, franz.flasch

On Thu, Mar 08, 2012 at 03:20:41PM +0100, Christian Engelmayer wrote:
> From: Franz Flasch <franz.flasch@frequentis.com>
> 
> Fixed a memory leak in the dry run path of function delete_entry().

Applied, thanks.

For your notice: I have put these in the master branch to skip the
overhead of maintaining -stable for the little amount of changes we
have had this time.

Since linux 3.3 is approaching, expect a new iptables release soon.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-03-12 12:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-08 14:20 [PATCH] iptables: missing free() in function delete_entry() Christian Engelmayer
2012-03-12 12:13 ` Pablo Neira Ayuso

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).