From: Tomasz Bursztyka Date: Tue, 16 Jul 2013 12:38:53 +0000 (+0300) Subject: nft: Fix small memory leaks X-Git-Tag: v1.6.0~111^2~82 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e9a0ef8f1e27f5ef13a27f6cc984e8f2e05afd72;p=thirdparty%2Fiptables.git nft: Fix small memory leaks Signed-off-by: Tomasz Bursztyka Signed-off-by: Pablo Neira Ayuso --- diff --git a/iptables/nft.c b/iptables/nft.c index cb46b7a4..daa5478a 100644 --- a/iptables/nft.c +++ b/iptables/nft.c @@ -2561,6 +2561,8 @@ next: c = nft_chain_list_iter_next(iter); } + nft_chain_list_iter_destroy(iter); + return 1; } @@ -2600,6 +2602,8 @@ int nft_rule_list_save(struct nft_handle *h, const char *chain, next: c = nft_chain_list_iter_next(iter); } + + nft_chain_list_iter_destroy(iter); err: nft_chain_list_free(list);