From: David S. Miller Date: Tue, 25 Aug 2015 20:38:50 +0000 (-0700) Subject: ah4: Fix error return in ah_input(). X-Git-Tag: v5.15~15163^2~95 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=94c10f0ea303473884f69edd6bbb0cedcf570105;p=platform%2Fkernel%2Flinux-starfive.git ah4: Fix error return in ah_input(). Noticed by Herbert Xu. Signed-off-by: David S. Miller --- diff --git a/net/ipv4/ah4.c b/net/ipv4/ah4.c index ac9a32e..f2a7102 100644 --- a/net/ipv4/ah4.c +++ b/net/ipv4/ah4.c @@ -360,8 +360,10 @@ static int ah_input(struct xfrm_state *x, struct sk_buff *skb) work_iph = ah_alloc_tmp(ahash, nfrags + sglists, ihl + ahp->icv_trunc_len + seqhi_len); - if (!work_iph) + if (!work_iph) { + err = -ENOMEM; goto out; + } seqhi = (__be32 *)((char *)work_iph + ihl); auth_data = ah_tmp_auth(seqhi, seqhi_len);