summaryrefslogtreecommitdiff
path: root/net/ipv4/ah4.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2015-08-25 23:38:50 +0300
committerDavid S. Miller <davem@davemloft.net>2015-08-25 23:38:50 +0300
commit94c10f0ea303473884f69edd6bbb0cedcf570105 (patch)
tree836e134e7ba22326599dfb15887f2f950ee71437 /net/ipv4/ah4.c
parent25105051fde444cac11a2e2599350e5388936428 (diff)
downloadlinux-94c10f0ea303473884f69edd6bbb0cedcf570105.tar.xz
ah4: Fix error return in ah_input().
Noticed by Herbert Xu. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/ah4.c')
-rw-r--r--net/ipv4/ah4.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/net/ipv4/ah4.c b/net/ipv4/ah4.c
index ac9a32ec3ee4..f2a71025a770 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);