aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/ipcomp.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv4/ipcomp.c')
-rw-r--r--net/ipv4/ipcomp.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/net/ipv4/ipcomp.c b/net/ipv4/ipcomp.c
index 8e0374847532..a0c28b2b756e 100644
--- a/net/ipv4/ipcomp.c
+++ b/net/ipv4/ipcomp.c
@@ -70,7 +70,8 @@ static int ipcomp_decompress(struct xfrm_state *x, struct sk_buff *skb)
70 if (err) 70 if (err)
71 goto out; 71 goto out;
72 72
73 skb_put(skb, dlen - plen); 73 skb->truesize += dlen - plen;
74 __skb_put(skb, dlen - plen);
74 memcpy(skb->data, scratch, dlen); 75 memcpy(skb->data, scratch, dlen);
75out: 76out:
76 put_cpu(); 77 put_cpu();
@@ -409,11 +410,10 @@ static int ipcomp_init_state(struct xfrm_state *x)
409 goto out; 410 goto out;
410 411
411 err = -ENOMEM; 412 err = -ENOMEM;
412 ipcd = kmalloc(sizeof(*ipcd), GFP_KERNEL); 413 ipcd = kzalloc(sizeof(*ipcd), GFP_KERNEL);
413 if (!ipcd) 414 if (!ipcd)
414 goto out; 415 goto out;
415 416
416 memset(ipcd, 0, sizeof(*ipcd));
417 x->props.header_len = 0; 417 x->props.header_len = 0;
418 if (x->props.mode) 418 if (x->props.mode)
419 x->props.header_len += sizeof(struct iphdr); 419 x->props.header_len += sizeof(struct iphdr);