Skip to content

Commit b29be0c

Browse files
committed
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 <pablo@netfilter.org>
1 parent e6345d2 commit b29be0c

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)