]> git.ipfire.org Git - thirdparty/iptables.git/commitdiff
xtables: Fix for wrong assert() in __nft_table_flush()
authorPhil Sutter <phil@nwl.cc>
Wed, 19 Sep 2018 13:16:43 +0000 (15:16 +0200)
committerFlorian Westphal <fw@strlen.de>
Mon, 24 Sep 2018 09:23:42 +0000 (11:23 +0200)
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 <phil@nwl.cc>
Signed-off-by: Florian Westphal <fw@strlen.de>
iptables/nft.c

index 48198edf4573c867d6aedfeb6572089aa2d39c4a..c67718c882a64f81cb61398299faa52d849754db 100644 (file)
@@ -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);