From ad6f914e8eab9b28eeba4ae172492eb665ace9f1 Mon Sep 17 00:00:00 2001 From: Eric Sesterhenn Date: Mon, 6 Mar 2006 21:42:07 +1100 Subject: [PATCH] --- yaml --- r: 22339 b: refs/heads/master c: bbeb563f7bb5e703e4d60c18bed81c987781343f h: refs/heads/master i: 22337: 1821c63a987c10727a8bbc05a57b06fb03972839 22335: 85a7b7a854e435c26843061025e8349d8889c14a v: v3 --- [refs] | 2 +- trunk/crypto/api.c | 4 +--- trunk/crypto/deflate.c | 3 +-- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/[refs] b/[refs] index c504a88b0ec9..880f4b981822 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: f10b7897ee29649fa7f0ccdc8d859ccd6ce7dbfd +refs/heads/master: bbeb563f7bb5e703e4d60c18bed81c987781343f diff --git a/trunk/crypto/api.c b/trunk/crypto/api.c index 34e02caffc2a..80bba637fba7 100644 --- a/trunk/crypto/api.c +++ b/trunk/crypto/api.c @@ -179,12 +179,10 @@ struct crypto_tfm *crypto_alloc_tfm(const char *name, u32 flags) goto out; tfm_size = sizeof(*tfm) + crypto_ctxsize(alg, flags); - tfm = kmalloc(tfm_size, GFP_KERNEL); + tfm = kzalloc(tfm_size, GFP_KERNEL); if (tfm == NULL) goto out_put; - memset(tfm, 0, tfm_size); - tfm->__crt_alg = alg; if (crypto_init_flags(tfm, flags)) diff --git a/trunk/crypto/deflate.c b/trunk/crypto/deflate.c index bc73342cd1ec..f209368d62ae 100644 --- a/trunk/crypto/deflate.c +++ b/trunk/crypto/deflate.c @@ -73,12 +73,11 @@ static int deflate_decomp_init(struct deflate_ctx *ctx) int ret = 0; struct z_stream_s *stream = &ctx->decomp_stream; - stream->workspace = kmalloc(zlib_inflate_workspacesize(), GFP_KERNEL); + stream->workspace = kzalloc(zlib_inflate_workspacesize(), GFP_KERNEL); if (!stream->workspace ) { ret = -ENOMEM; goto out; } - memset(stream->workspace, 0, zlib_inflate_workspacesize()); ret = zlib_inflateInit2(stream, -DEFLATE_DEF_WINBITS); if (ret != Z_OK) { ret = -EINVAL;