From: Phil Sutter Date: Wed, 19 Sep 2018 13:16:43 +0000 (+0200) Subject: xtables: Fix for wrong assert() in __nft_table_flush() X-Git-Tag: v1.8.1~39 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=7ae4fb1348874afbfd760d6b7a24e4ea2d6e67ab;p=thirdparty%2Fiptables.git xtables: Fix for wrong assert() in __nft_table_flush() The code obviously tries to assert that nft_table_builtin_find() returned a valid pointer before dereferencing it, but the wrong argument was given. Assume this is just a typo and insert the missing underscore. Fixes: 9b896224e0bfc ("xtables: rework rule cache logic") Signed-off-by: Phil Sutter Signed-off-by: Florian Westphal --- diff --git a/iptables/nft.c b/iptables/nft.c index 48198edf..c67718c8 100644 --- a/iptables/nft.c +++ b/iptables/nft.c @@ -1899,7 +1899,7 @@ static int __nft_table_flush(struct nft_handle *h, const char *table) batch_table_add(h, NFT_COMPAT_TABLE_FLUSH, t); _t = nft_table_builtin_find(h, table); - assert(t); + assert(_t); _t->initialized = false; flush_chain_cache(h, table);