From: Franz Flasch Date: Thu, 8 Mar 2012 04:20:41 +0000 (+0000) Subject: iptables: missing free() in function delete_entry() X-Git-Tag: v1.4.13~3 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=61b8f7ecb64b3b6fe04d2a6ad9598f66e42ceea8;p=thirdparty%2Fiptables.git iptables: missing free() in function delete_entry() Fixed a memory leak in the dry run path of function delete_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 396bc8f5..13e41d52 100644 --- a/libiptc/libiptc.c +++ b/libiptc/libiptc.c @@ -1993,8 +1993,10 @@ static int delete_entry(const IPT_CHAINLABEL chain, const STRUCT_ENTRY *origfw, 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