netfilter: nf_tables: destroy the set if fail to add transaction

commit c17c3cdff1 upstream.

When the memory is exhausted, then we will fail to add the NFT_MSG_NEWSET
transaction. In such case, we should destroy the set before we free it.

Fixes: 958bee14d0 ("netfilter: nf_tables: use new transaction infrastructure to handle sets")
Signed-off-by: Liping Zhang <zlpnobody@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
This commit is contained in:
Liping Zhang 2016-10-29 22:03:05 +08:00 • committed by Ben Hutchings
commit 6ca68d9535