diff options
Diffstat (limited to 'crypto/zlib.c')
| -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 c3015733c990..739b8fca4cea 100644 --- a/crypto/zlib.c +++ b/crypto/zlib.c | |||
| @@ -95,11 +95,10 @@ static int zlib_compress_setup(struct crypto_pcomp *tfm, void *params, | |||
| 95 | zlib_comp_exit(ctx); | 95 | zlib_comp_exit(ctx); |
| 96 | 96 | ||
| 97 | workspacesize = zlib_deflate_workspacesize(); | 97 | workspacesize = zlib_deflate_workspacesize(); |
| 98 | stream->workspace = vmalloc(workspacesize); | 98 | stream->workspace = vzalloc(workspacesize); |
| 99 | if (!stream->workspace) | 99 | if (!stream->workspace) |
| 100 | return -ENOMEM; | 100 | return -ENOMEM; |
| 101 | 101 | ||
| 102 | memset(stream->workspace, 0, workspacesize); | ||
| 103 | ret = zlib_deflateInit2(stream, | 102 | ret = zlib_deflateInit2(stream, |
| 104 | tb[ZLIB_COMP_LEVEL] | 103 | tb[ZLIB_COMP_LEVEL] |
| 105 | ? nla_get_u32(tb[ZLIB_COMP_LEVEL]) | 104 | ? nla_get_u32(tb[ZLIB_COMP_LEVEL]) |
