Skip to contentSkip to conversation

xtables-translate: Use proper clear_cs function

PATCH New Phil Sutter 1 participant 1 message Jun 16, 2020 netfilter

lore
Share & tools
lore

Phil Sutter

author reviewer
#0 lore raw

PATCH 1/1 xtables-translate: Use proper clear_cs function

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

---
 iptables/xtables-translate.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
iptables/xtables-translate.c +1 -1
index 5aa42496b5a48..c348c4df4933c 100644
@@ -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);
Signature · 1 line
2.27.0