Skip to content

Commit 7395d33

Browse files
committed
netfilter: nft_immediate: drop chain reference counter on error
JIRA: https://issues.redhat.com/browse/RHEL-21443 Upstream Status: commit b29be0c commit b29be0c Author: Pablo Neira Ayuso <[email protected]> Date: Mon Jan 1 20:15:33 2024 +0100 netfilter: nft_immediate: drop chain reference counter on error In the init path, nft_data_init() bumps the chain reference counter, decrement it on error by following the error path which calls nft_data_release() to restore it. Fixes: 4bedf9e ("netfilter: nf_tables: fix chain binding transaction logic") Signed-off-by: Pablo Neira Ayuso <[email protected]> Signed-off-by: Florian Westphal <[email protected]>
1 parent d51e691 commit 7395d33

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/netfilter/nft_immediate.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ static int nft_immediate_init(const struct nft_ctx *ctx,
7878
case NFT_GOTO:
7979
err = nf_tables_bind_chain(ctx, chain);
8080
if (err < 0)
81-
return err;
81+
goto err1;
8282
break;
8383
default:
8484
break;

0 commit comments

Comments
 (0)