mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-13 08:07:32 -04:00
esp6: fix memleak on error path in esp6_input
This ought to be an omission ine619492323("esp: Fix memleaks on error paths."). The memleak on error path in esp6_input is similar to esp_input of esp4. Fixes:e619492323("esp: Fix memleaks on error paths.") Fixes:3f29770723("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>
This commit is contained in:
parent
86126b77dc
commit
7284fdf39a
1 changed files with 3 additions and 1 deletions
|
|
@ -669,8 +669,10 @@ skip_cow:
|
|||
|
||||
sg_init_table(sg, nfrags);
|
||||
ret = skb_to_sgvec(skb, sg, 0, skb->len);
|
||||
if (unlikely(ret < 0))
|
||||
if (unlikely(ret < 0)) {
|
||||
kfree(tmp);
|
||||
goto out;
|
||||
}
|
||||
|
||||
skb->ip_summed = CHECKSUM_NONE;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue