diff options
author | Joe Perches <joe@perches.com> | 2010-11-27 16:30:39 +0800 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2010-11-27 16:30:39 +0800 |
commit | ef7b40e404d76979e72c44934be59a0ef1390488 (patch) | |
tree | 4d1ba29dbc8d3c37a48db1b0ccb58da7ae9149cc /crypto/zlib.c | |
parent | fcbb8a3beda31c7b3bc4db59314a4efb147ee969 (diff) | |
download | linux-crypto-ef7b40e404d76979e72c44934be59a0ef1390488.tar.gz linux-crypto-ef7b40e404d76979e72c44934be59a0ef1390488.zip |
crypto: Use vzalloc
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to '')
-rw-r--r-- | crypto/zlib.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/crypto/zlib.c b/crypto/zlib.c index c3015733..739b8fca 100644 --- a/crypto/zlib.c +++ b/crypto/zlib.c @@ -95,11 +95,10 @@ static int zlib_compress_setup(struct crypto_pcomp *tfm, void *params, zlib_comp_exit(ctx); workspacesize = zlib_deflate_workspacesize(); - stream->workspace = vmalloc(workspacesize); + stream->workspace = vzalloc(workspacesize); if (!stream->workspace) return -ENOMEM; - memset(stream->workspace, 0, workspacesize); ret = zlib_deflateInit2(stream, tb[ZLIB_COMP_LEVEL] ? nla_get_u32(tb[ZLIB_COMP_LEVEL]) |