diff options
Diffstat (limited to 'net/ipv6/ipcomp6.c')
-rw-r--r-- | net/ipv6/ipcomp6.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/net/ipv6/ipcomp6.c b/net/ipv6/ipcomp6.c index 3c7b324cd20c..028b636687ec 100644 --- a/net/ipv6/ipcomp6.c +++ b/net/ipv6/ipcomp6.c | |||
@@ -428,11 +428,10 @@ static int ipcomp6_init_state(struct xfrm_state *x) | |||
428 | goto out; | 428 | goto out; |
429 | 429 | ||
430 | err = -ENOMEM; | 430 | err = -ENOMEM; |
431 | ipcd = kmalloc(sizeof(*ipcd), GFP_KERNEL); | 431 | ipcd = kzalloc(sizeof(*ipcd), GFP_KERNEL); |
432 | if (!ipcd) | 432 | if (!ipcd) |
433 | goto out; | 433 | goto out; |
434 | 434 | ||
435 | memset(ipcd, 0, sizeof(*ipcd)); | ||
436 | x->props.header_len = 0; | 435 | x->props.header_len = 0; |
437 | if (x->props.mode) | 436 | if (x->props.mode) |
438 | x->props.header_len += sizeof(struct ipv6hdr); | 437 | x->props.header_len += sizeof(struct ipv6hdr); |