Skip to contentSkip to conversation

iptables: missing free() in function delete_entry()

PATCH Applied Christian Engelmayer 2 participants 2 messages Mar 8, 2012 – Mar 12, 2012 netfilter

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 iptables: missing free() in function delete_entry()

From: Franz Flasch <[email protected]>

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

---

libiptc/libiptc.c +3 -1
@@ -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
maintainer Applied
#1 lore raw
Quoted 3 lines · Christian Engelmayer

From: Franz Flasch <[email protected]>

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.