提交 0dc13625 编写于 作者: T Thomas Graf 提交者: Pablo Neira Ayuso

netfilter: nf_tables: Avoid duplicate call to nft_data_uninit() for same key

nft_del_setelem() currently calls nft_data_uninit() twice on the same
key. Once to release the key which is guaranteed to be NFT_DATA_VALUE
and a second time in the error path to which it falls through.

The second call has been harmless so far though because the type
passed is always NFT_DATA_VALUE which is currently a no-op.
Signed-off-by: NThomas Graf <tgraf@suug.ch>
Signed-off-by: NPablo Neira Ayuso <pablo@netfilter.org>
上级 8452e6ff
......@@ -3218,6 +3218,7 @@ static int nft_del_setelem(struct nft_ctx *ctx, struct nft_set *set,
if (set->flags & NFT_SET_MAP)
nft_data_uninit(&elem.data, set->dtype);
return 0;
err2:
nft_data_uninit(&elem.key, desc.type);
err1:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册