Commit 00bd4352 authored by Jeremy Sowden's avatar Jeremy Sowden Committed by Florian Westphal

netfilter: bitwise: improve error goto labels

Replace two labels (`err1` and `err2`) with more informative ones.
Signed-off-by: default avatarJeremy Sowden <jeremy@azazel.net>
Signed-off-by: default avatarFlorian Westphal <fw@strlen.de>
parent c70b921f
...@@ -109,22 +109,23 @@ static int nft_bitwise_init_bool(struct nft_bitwise *priv, ...@@ -109,22 +109,23 @@ static int nft_bitwise_init_bool(struct nft_bitwise *priv,
return err; return err;
if (mask.type != NFT_DATA_VALUE || mask.len != priv->len) { if (mask.type != NFT_DATA_VALUE || mask.len != priv->len) {
err = -EINVAL; err = -EINVAL;
goto err1; goto err_mask_release;
} }
err = nft_data_init(NULL, &priv->xor, sizeof(priv->xor), &xor, err = nft_data_init(NULL, &priv->xor, sizeof(priv->xor), &xor,
tb[NFTA_BITWISE_XOR]); tb[NFTA_BITWISE_XOR]);
if (err < 0) if (err < 0)
goto err1; goto err_mask_release;
if (xor.type != NFT_DATA_VALUE || xor.len != priv->len) { if (xor.type != NFT_DATA_VALUE || xor.len != priv->len) {
err = -EINVAL; err = -EINVAL;
goto err2; goto err_xor_release;
} }
return 0; return 0;
err2:
err_xor_release:
nft_data_release(&priv->xor, xor.type); nft_data_release(&priv->xor, xor.type);
err1: err_mask_release:
nft_data_release(&priv->mask, mask.type); nft_data_release(&priv->mask, mask.type);
return err; return err;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment