Skip to contentSkip to conversation

iptables: missing free() in function cache_add_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 cache_add_entry()

From: Franz Flasch <[email protected]>

Fixed a memory leak in the error path of function cache_add_entry().

---

libiptc/libiptc.c +1 -0
@@ -1012,6 +1012,7 @@ new_rule:
 			if (t->target.u.target_size
 			    != ALIGN(sizeof(STRUCT_STANDARD_TARGET))) {
 				errno = EINVAL;
+				free(r);
 				return -1;
 			}
 
maintainer Applied
#1 lore raw
Quoted 3 lines · Christian Engelmayer

From: Franz Flasch <[email protected]>

Fixed a memory leak in the error path of function cache_add_entry().

Applied, thanks.