[NET]: Conversions from kmalloc+memset to k(z|c)alloc.
Signed-off-by: Panagiotis Issaris <takis@issaris.org> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
a0ee7c70b2
commit
0da974f4f3
@@ -215,12 +215,10 @@ static int ah_init_state(struct xfrm_state *x)
|
||||
if (x->encap)
|
||||
goto error;
|
||||
|
||||
ahp = kmalloc(sizeof(*ahp), GFP_KERNEL);
|
||||
ahp = kzalloc(sizeof(*ahp), GFP_KERNEL);
|
||||
if (ahp == NULL)
|
||||
return -ENOMEM;
|
||||
|
||||
memset(ahp, 0, sizeof(*ahp));
|
||||
|
||||
ahp->key = x->aalg->alg_key;
|
||||
ahp->key_len = (x->aalg->alg_key_len+7)/8;
|
||||
ahp->tfm = crypto_alloc_tfm(x->aalg->alg_name, 0);
|
||||
|
Reference in New Issue
Block a user