From: Franz Flasch Date: Thu, 8 Mar 2012 04:20:37 +0000 (+0000) Subject: iptables: missing free() in function cache_add_entry() X-Git-Tag: v1.4.13~4 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1a7732f965c2b09e526eeca8a551538fbdc099ef;p=thirdparty%2Fiptables.git iptables: missing free() in function cache_add_entry() Fixed a memory leak in the error path of function cache_add_entry(). Signed-off-by: Franz Flasch Signed-off-by: Christian Engelmayer Signed-off-by: Pablo Neira Ayuso --- diff --git a/libiptc/libiptc.c b/libiptc/libiptc.c index 63fcfc2a..396bc8f5 100644 --- a/libiptc/libiptc.c +++ b/libiptc/libiptc.c @@ -1003,6 +1003,7 @@ new_rule: if (t->target.u.target_size != ALIGN(sizeof(STRUCT_STANDARD_TARGET))) { errno = EINVAL; + free(r); return -1; }