]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
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)
committerBen Hutchings <ben@decadent.org.uk>
Thu, 23 Feb 2017 03:54:26 +0000 (03:54 +0000)
commit6ca68d9535acf388b07d141a743316632d8b3cbe
tree74546fb2762adfc4105f11e45cd50b1c120c8629
parent36da5ca72753251ea0e188792e801a0ad4bdbb37
netfilter: nf_tables: destroy the set if fail to add transaction

commit c17c3cdff10b9f59ef1244a14604f10949f17117 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: 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>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
net/netfilter/nf_tables_api.c