From: Patrick McHardy Date: Mon, 13 Mar 2006 04:33:49 +0000 (-0800) Subject: [XFRM]: Fix leak in ah6_input X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=f8dc01f543f28253abeef649987249210d8db3cc;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git [XFRM]: Fix leak in ah6_input tmp_hdr is not freed when ipv6_clear_mutable_options fails. Coverity #650 Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller --- diff --git a/net/ipv6/ah6.c b/net/ipv6/ah6.c index c7932cb420a5..84963749ab77 100644 --- a/net/ipv6/ah6.c +++ b/net/ipv6/ah6.c @@ -279,7 +279,7 @@ static int ah6_input(struct xfrm_state *x, struct xfrm_decap_state *decap, struc goto out; memcpy(tmp_hdr, skb->nh.raw, hdr_len); if (ipv6_clear_mutable_options(skb->nh.ipv6h, hdr_len)) - goto out; + goto free_out; skb->nh.ipv6h->priority = 0; skb->nh.ipv6h->flow_lbl[0] = 0; skb->nh.ipv6h->flow_lbl[1] = 0;