diff options
Diffstat (limited to 'net/ipv6/ah6.c')
-rw-r--r-- | net/ipv6/ah6.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/net/ipv6/ah6.c b/net/ipv6/ah6.c index 2b55b9a97ae..cf58251df4b 100644 --- a/net/ipv6/ah6.c +++ b/net/ipv6/ah6.c | |||
@@ -354,12 +354,10 @@ static int ah6_init_state(struct xfrm_state *x) | |||
354 | if (x->encap) | 354 | if (x->encap) |
355 | goto error; | 355 | goto error; |
356 | 356 | ||
357 | ahp = kmalloc(sizeof(*ahp), GFP_KERNEL); | 357 | ahp = kzalloc(sizeof(*ahp), GFP_KERNEL); |
358 | if (ahp == NULL) | 358 | if (ahp == NULL) |
359 | return -ENOMEM; | 359 | return -ENOMEM; |
360 | 360 | ||
361 | memset(ahp, 0, sizeof(*ahp)); | ||
362 | |||
363 | ahp->key = x->aalg->alg_key; | 361 | ahp->key = x->aalg->alg_key; |
364 | ahp->key_len = (x->aalg->alg_key_len+7)/8; | 362 | ahp->key_len = (x->aalg->alg_key_len+7)/8; |
365 | ahp->tfm = crypto_alloc_tfm(x->aalg->alg_name, 0); | 363 | ahp->tfm = crypto_alloc_tfm(x->aalg->alg_name, 0); |