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.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/net/ipv4/ipcomp.c b/net/ipv4/ipcomp.c
index 8a8b5cf2f7fe..a0c28b2b756e 100644
--- a/net/ipv4/ipcomp.c
+++ b/net/ipv4/ipcomp.c
@@ -410,11 +410,10 @@ static int ipcomp_init_state(struct xfrm_state *x)
410 goto out; 410 goto out;
411 411
412 err = -ENOMEM; 412 err = -ENOMEM;
413 ipcd = kmalloc(sizeof(*ipcd), GFP_KERNEL); 413 ipcd = kzalloc(sizeof(*ipcd), GFP_KERNEL);
414 if (!ipcd) 414 if (!ipcd)
415 goto out; 415 goto out;
416 416
417 memset(ipcd, 0, sizeof(*ipcd));
418 x->props.header_len = 0; 417 x->props.header_len = 0;
419 if (x->props.mode) 418 if (x->props.mode)
420 x->props.header_len += sizeof(struct iphdr); 419 x->props.header_len += sizeof(struct iphdr);