summaryrefslogtreecommitdiffstats
path: root/net/ipv6/ah6.c
diff options
context:
space:
mode:
authorIngo Oeser2006-03-21 08:01:32 +0100
committerDavid S. Miller2006-03-21 08:01:32 +0100
commit0c600eda4b1c9f8f6d1bd643d494db5a29842fbe (patch)
tree3340fda7a4f9f481e7f91ed1f376c7b4bd5e9a6e /net/ipv6/ah6.c
parent[IPV6]: Cleanup of net/ipv6/reassambly.c (diff)
downloadkernel-qcow2-linux-0c600eda4b1c9f8f6d1bd643d494db5a29842fbe.tar.gz
kernel-qcow2-linux-0c600eda4b1c9f8f6d1bd643d494db5a29842fbe.tar.xz
kernel-qcow2-linux-0c600eda4b1c9f8f6d1bd643d494db5a29842fbe.zip
[IPV6]: Nearly complete kzalloc cleanup for net/ipv6
Stupidly use kzalloc() instead of kmalloc()/memset() everywhere where this is possible in net/ipv6/*.c . Signed-off-by: Ingo Oeser <ioe-lkml@rameria.de> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/ah6.c')
-rw-r--r--net/ipv6/ah6.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/net/ipv6/ah6.c b/net/ipv6/ah6.c
index 2b55b9a97aea..cf58251df4b3 100644
--- a/net/ipv6/ah6.c
+++ b/net/ipv6/ah6.c
@@ -354,12 +354,10 @@ static int ah6_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);