X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=crypto%2Fzlib.c;h=06b62e5cdcc72a93281051a7c07b5090be9abeaa;hb=e312eb1e66e4357000e4e7438849d5a5fd738219;hp=d11d761a5e418191c29a987f923ac3e2be0f20a6;hpb=1b4610ebf37a05a65e9f29cdf4d87c207573104d;p=pandora-kernel.git diff --git a/crypto/zlib.c b/crypto/zlib.c index d11d761a5e41..06b62e5cdcc7 100644 --- a/crypto/zlib.c +++ b/crypto/zlib.c @@ -29,7 +29,6 @@ #include #include #include -#include #include @@ -60,7 +59,7 @@ static void zlib_decomp_exit(struct zlib_ctx *ctx) if (stream->workspace) { zlib_inflateEnd(stream); - kfree(stream->workspace); + vfree(stream->workspace); stream->workspace = NULL; } } @@ -228,13 +227,13 @@ static int zlib_decompress_setup(struct crypto_pcomp *tfm, void *params, ? nla_get_u32(tb[ZLIB_DECOMP_WINDOWBITS]) : DEF_WBITS; - stream->workspace = kzalloc(zlib_inflate_workspacesize(), GFP_KERNEL); + stream->workspace = vzalloc(zlib_inflate_workspacesize()); if (!stream->workspace) return -ENOMEM; ret = zlib_inflateInit2(stream, ctx->decomp_windowBits); if (ret != Z_OK) { - kfree(stream->workspace); + vfree(stream->workspace); stream->workspace = NULL; return -EINVAL; }