summaryrefslogtreecommitdiffstats
path: root/iptables/nft.c
diff options
context:
space:
mode:
authorPhil Sutter <phil@nwl.cc>2018-12-20 16:09:03 +0100
committerPablo Neira Ayuso <pablo@netfilter.org>2018-12-26 11:17:37 +0100
commit7e09582a57440f13796bdd5bd70466ef0913345b (patch)
tree0176c30fd184bf2c0ee296aeea50790179b5bdb5 /iptables/nft.c
parent71f9e474d467dd59582d7a3920eded9613b99000 (diff)
nft: Review unclear return points
When converting to per table chain caches, these two error returns were marked for review but apparently forgotten. Make sure error condition is propagated when returning at those points. Fixes: c58ecf9f8bcb7 ("xtables: Introduce per table chain caches") Signed-off-by: Phil Sutter <phil@nwl.cc> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'iptables/nft.c')
-rw-r--r--iptables/nft.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/iptables/nft.c b/iptables/nft.c
index 9d20eb0e..1fca1f17 100644
--- a/iptables/nft.c
+++ b/iptables/nft.c
@@ -2311,7 +2311,7 @@ int nft_rule_list(struct nft_handle *h, const char *chain, const char *table,
list = nft_chain_list_get(h, table);
if (!list)
- goto err; /* XXX: return 0 instead? */
+ return 0;
iter = nftnl_chain_list_iter_create(list);
if (iter == NULL)
@@ -2450,7 +2450,7 @@ int nft_rule_list_save(struct nft_handle *h, const char *chain,
list = nft_chain_list_get(h, table);
if (!list)
- goto err; /* XXX: correct? */
+ goto err;
/* Dump policies and custom chains first */
if (!rulenum)