netfilter: nf_queue: fix socket leak
authorVimal Agrawal <avimalin@gmail.com>
Tue, 11 Oct 2022 17:22:02 +0000 (22:52 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 26 Oct 2022 11:16:53 +0000 (13:16 +0200)
commitf7e6a2f9e2f2b7d87cded41f904268865f44f967
treed36102461da3608ff135e797330eb177b49bb202
parent12faed72cf1a7e32253cb7b839104e03a923cbff
netfilter: nf_queue: fix socket leak

Removal of the sock_hold got lost when backporting commit 4d05239203fa
("netfilter: nf_queue: fix possible use-after-free") to 4.14

This was causing a socket leak and was caught by kmemleak.
Tested by running kmemleak again with this fix.

Fixes: ef97921ccdc2 ("netfilter: nf_queue: fix possible use-after-free") in 4.14
Signed-off-by: Vimal Agrawal <vimal.agrawal@sophos.com>
Reviewed-by: Florian Westphal <fw@strlen.de>
net/netfilter/nf_queue.c