]> git.baikalelectronics.ru Git - kernel.git/commit
netfilter: nfnetlink_queue: fix memory leak when attach expectation successfully
authorLiping Zhang <liping.zhang@spreadtrum.com>
Mon, 8 Aug 2016 14:03:40 +0000 (22:03 +0800)
committerPablo Neira Ayuso <pablo@netfilter.org>
Tue, 9 Aug 2016 08:39:25 +0000 (10:39 +0200)
commit007f96503df0271ab8d01a4321397d20b8910129
treee4953f2cfc6e10c6c7a19b0f02bef6eb951e367b
parenta5f52252f2f2cfb3b7c5c5ff7b98e81d783869f0
netfilter: nfnetlink_queue: fix memory leak when attach expectation successfully

User can use NFQA_EXP to attach expectations to conntracks, but we
forget to put back nf_conntrack_expect when it is inserted successfully,
i.e. in this normal case, expect's use refcnt will be 3. So even we
unlink it and put it back later, the use refcnt is still 1, then the
memory will be leaked forever.

Signed-off-by: Liping Zhang <liping.zhang@spreadtrum.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/netfilter/nf_conntrack_netlink.c