netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] nft: fix leak of iterators
@ 2013-06-05 12:43 Giuseppe Longo
  0 siblings, 0 replies; only message in thread
From: Giuseppe Longo @ 2013-06-05 12:43 UTC (permalink / raw)
  To: netfilter-devel

This patch fix leak of iterators
Signed-off-by: Giuseppe Longo <giuseppelng@gmail.com>
---
 iptables/nft.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/iptables/nft.c b/iptables/nft.c
index c18999b..0ded02d 100644
--- a/iptables/nft.c
+++ b/iptables/nft.c
@@ -1112,6 +1112,7 @@ next:
 		c = nft_chain_list_iter_next(iter);
 	}
 
+        nft_chain_list_iter_destroy(iter);
 	nft_chain_list_free(list);
 
 	return 1;
@@ -1200,6 +1201,7 @@ next:
 		r = nft_rule_list_iter_next(iter);
 	}
 
+        nft_chain_list_iter_destroy(list);
 	nft_rule_list_free(list);
 
 	/* the core expects 1 for success and 0 for error */
@@ -1278,6 +1280,7 @@ next:
 	}
 
 err:
+        nft_chain_list_iter_destroy(iter);
 	nft_chain_list_free(list);
 
 	/* the core expects 1 for success and 0 for error */
@@ -1391,6 +1394,7 @@ next:
 	}
 
 err:
+        nft_chain_list_iter_destroy(iter);
 	nft_chain_list_free(list);
 
 	/* chain not found */


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2013-06-05 12:43 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-05 12:43 [PATCH] nft: fix leak of iterators Giuseppe Longo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).