esp: Fix memleaks on error paths.
authorSteffen Klassert <steffen.klassert@secunet.com>
Thu, 13 Jul 2017 07:13:30 +0000 (09:13 +0200)
committerSteffen Klassert <steffen.klassert@secunet.com>
Thu, 13 Jul 2017 07:26:24 +0000 (09:26 +0200)
commite6194923237f3952b955c343b65b211f36bce01c
tree09b07a46cad63c3e9ebef5a4c605e2fe73c0cd87
parentedaf3825182958a1fd5e39708fcb6ea48eca2060
esp: Fix memleaks on error paths.

We leak the temporary allocated resources in error paths,
fix this by freeing them.

Fixes: fca11ebde3f ("esp4: Reorganize esp_output")
Fixes: 383d0350f2c ("esp6: Reorganize esp_output")
Fixes: 3f29770723f ("ipsec: check return value of skb_to_sgvec always")
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
net/ipv4/esp4.c
net/ipv6/esp6.c