xfrm: free skb if nlsk pointer is NULL
authorFlorian Westphal <fw@strlen.de>
Mon, 25 Jun 2018 12:00:07 +0000 (14:00 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 5 Sep 2018 07:18:33 +0000 (09:18 +0200)
commitd9c00c89596a239996dd8659b7f4db5674e51a98
tree80ec81b4c7c9d219bd10ea4913f85a6dbb2e7c18
parentdbcad9a65dbb5f3efa1391f8e4b67303669f8cc0
xfrm: free skb if nlsk pointer is NULL

[ Upstream commit 86126b77dcd551ce223e7293bb55854e3df05646 ]

nlmsg_multicast() always frees the skb, so in case we cannot call
it we must do that ourselves.

Fixes: 21ee543edc0dea ("xfrm: fix race between netns cleanup and state expire notification")
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/xfrm/xfrm_user.c