nft: fix wrong function to release iterator
nft.c: In function ‘nft_xtables_config_load’:
nft.c:2522:3: warning: passing argument 1 of ‘nft_table_list_iter_destroy’ from incompatible pointer type [enabled by default]
In file included from nft.c:41:0:
/usr/include/libnftables/table.h:64:6: note: expected ‘struct nft_table_list_iter *’ but argument is of type ‘struct nft_chain_list_iter *’
Introduced in (12eb85b nft: fix memory leaks in
nft_xtables_config_load) but that was my fault indeed since Ana sent
a v2 patch that I have overlook.
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
diff --git a/iptables/nft.c b/iptables/nft.c
index a015947..6f3fdb0 100644
--- a/iptables/nft.c
+++ b/iptables/nft.c
@@ -2519,7 +2519,7 @@
if (titer != NULL)
nft_table_list_iter_destroy(titer);
if (citer != NULL)
- nft_table_list_iter_destroy(citer);
+ nft_chain_list_iter_destroy(citer);
return -1;
}