summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorJeremy Sowden <jeremy@azazel.net>2022-04-04 13:04:15 +0100
committerFlorian Westphal <fw@strlen.de>2022-04-09 12:02:23 +0200
commit00bd435208e5201eb935d273052930bd3b272b6f (patch)
tree5d8e91a3b050ee763b9131cb9357fd65d84635b3 /net
parentc70b921fc1e877243f0fb495d18bb884a776b273 (diff)
netfilter: bitwise: improve error goto labels
Replace two labels (`err1` and `err2`) with more informative ones. Signed-off-by: Jeremy Sowden <jeremy@azazel.net> Signed-off-by: Florian Westphal <fw@strlen.de>
Diffstat (limited to 'net')
-rw-r--r--net/netfilter/nft_bitwise.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/net/netfilter/nft_bitwise.c b/net/netfilter/nft_bitwise.c
index dc5759fac5b6..d72143622f22 100644
--- a/net/netfilter/nft_bitwise.c
+++ b/net/netfilter/nft_bitwise.c
@@ -109,22 +109,23 @@ static int nft_bitwise_init_bool(struct nft_bitwise *priv,
return err;
if (mask.type != NFT_DATA_VALUE || mask.len != priv->len) {
err = -EINVAL;
- goto err1;
+ goto err_mask_release;
}
err = nft_data_init(NULL, &priv->xor, sizeof(priv->xor), &xor,
tb[NFTA_BITWISE_XOR]);
if (err < 0)
- goto err1;
+ goto err_mask_release;
if (xor.type != NFT_DATA_VALUE || xor.len != priv->len) {
err = -EINVAL;
- goto err2;
+ goto err_xor_release;
}
return 0;
-err2:
+
+err_xor_release:
nft_data_release(&priv->xor, xor.type);
-err1:
+err_mask_release:
nft_data_release(&priv->mask, mask.type);
return err;
}