netfilter: nf_tables: destroy the set if fail to add transaction
authorLiping Zhang <zlpnobody@gmail.com>
Sat, 29 Oct 2016 14:03:05 +0000 (22:03 +0800)
committerPablo Neira Ayuso <pablo@netfilter.org>
Mon, 31 Oct 2016 12:17:29 +0000 (13:17 +0100)
commitc17c3cdff10b9f59ef1244a14604f10949f17117
treef7ecd0a5e29b63d7b7d2af9b0fb189446994f045
parent5747620257812530adda58cbff591fede6fb261e
netfilter: nf_tables: destroy the set if fail to add transaction

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: 958bee14d071 ("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>
net/netfilter/nf_tables_api.c