Skip to content

Commit 1fb7696

Browse files
Yang Yingliangummakynes
authored andcommitted
netfilter: nf_tables: fix wrong pointer passed to PTR_ERR()
It should be 'chain' passed to PTR_ERR() in the error path after calling nft_chain_lookup() in nf_tables_delrule(). Fixes: f80a612 ("netfilter: nf_tables: add support to destroy operation") Signed-off-by: Yang Yingliang <[email protected]> Reviewed-by: Simon Horman <[email protected]> Acked-by: Fernando Fernandez Mancera <[email protected]> Signed-off-by: Pablo Neira Ayuso <[email protected]>
1 parent dac7f50 commit 1fb7696

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/netfilter/nf_tables_api.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3724,7 +3724,7 @@ static int nf_tables_delrule(struct sk_buff *skb, const struct nfnl_info *info,
37243724
chain = nft_chain_lookup(net, table, nla[NFTA_RULE_CHAIN],
37253725
genmask);
37263726
if (IS_ERR(chain)) {
3727-
if (PTR_ERR(rule) == -ENOENT &&
3727+
if (PTR_ERR(chain) == -ENOENT &&
37283728
NFNL_MSG_TYPE(info->nlh->nlmsg_type) == NFT_MSG_DESTROYRULE)
37293729
return 0;
37303730

0 commit comments

Comments
 (0)