From: Phil Sutter Date: Tue, 16 Jun 2020 11:06:26 +0000 (+0200) Subject: xtables-translate: Use proper clear_cs function X-Git-Tag: v1.8.6~34 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=63fa2b1cb98be66990912d7eb42eab5440437087;p=thirdparty%2Fiptables.git xtables-translate: Use proper clear_cs function Avoid memleaks by performing a full free of any allocated data in local iptables_command_state variable. Signed-off-by: Phil Sutter --- diff --git a/iptables/xtables-translate.c b/iptables/xtables-translate.c index 363c8be1..575fb320 100644 --- a/iptables/xtables-translate.c +++ b/iptables/xtables-translate.c @@ -319,7 +319,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);