esp6: fix memleak on error path in esp6_input
authorZhen Lei <thunder.leizhen@huawei.com>
Wed, 27 Jun 2018 03:49:28 +0000 (11:49 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 5 Sep 2018 07:26:23 +0000 (09:26 +0200)
commitb6f147a2d90765e68effe04c42f79875b33cd2af
treea2a8f9320b0610e0c72a726d93088e342b37ad60
parent0118f86d21f1fdc83e5b560d761b5db0fded25ad
esp6: fix memleak on error path in esp6_input

[ Upstream commit 7284fdf39a912322ce97de2d30def3c6068a418c ]

This ought to be an omission in e6194923237 ("esp: Fix memleaks on error
paths."). The memleak on error path in esp6_input is similar to esp_input
of esp4.

Fixes: e6194923237 ("esp: Fix memleaks on error paths.")
Fixes: 3f29770723f ("ipsec: check return value of skb_to_sgvec always")
Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
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/ipv6/esp6.c