X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=crypto%2Fdeflate.c;fp=crypto%2Fdeflate.c;h=f209368d62aefab5c1c1998f2af20159d5323d6b;hb=43bc926fffd92024b46cafaf7350d669ba9ca884;hp=bc73342cd1ecc253909440de480909b7eab10beb;hpb=cee37fe97739d85991964371c1f3a745c00dd236;p=linux-2.6.git diff --git a/crypto/deflate.c b/crypto/deflate.c index bc73342cd..f209368d6 100644 --- a/crypto/deflate.c +++ b/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;