All of lore.kernel.org
 help / color / mirror / Atom feed
* [iptables PATCH] xtables-translate: Use proper clear_cs function
@ 2020-06-16 11:08 Phil Sutter
  0 siblings, 0 replies; only message in thread
From: Phil Sutter @ 2020-06-16 11:08 UTC (permalink / raw)
  To: Pablo Neira Ayuso; +Cc: netfilter-devel

Avoid memleaks by performing a full free of any allocated data in local
iptables_command_state variable.

Signed-off-by: Phil Sutter <phil@nwl.cc>
---
 iptables/xtables-translate.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/iptables/xtables-translate.c b/iptables/xtables-translate.c
index 5aa42496b5a48..c348c4df4933c 100644
--- a/iptables/xtables-translate.c
+++ b/iptables/xtables-translate.c
@@ -316,7 +316,7 @@ static int do_command_xlate(struct nft_handle *h, int argc, char *argv[],
 		exit(1);
 	}
 
-	xtables_rule_matches_free(&cs.matches);
+	nft_clear_iptables_command_state(&cs);
 
 	if (h->family == AF_INET) {
 		free(args.s.addr.v4);
-- 
2.27.0


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

only message in thread, other threads:[~2020-06-16 11:08 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-16 11:08 [iptables PATCH] xtables-translate: Use proper clear_cs function Phil Sutter

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.