tree 74da3bcb6c603f2681182250007d38e0c2c620a3
parent d42ce812b8a32adddeee3a692005f82f95ff15a3
author Artem B. Bityuckiy <[EMAIL PROTECTED]> Sun, 17 Apr 2005 05:23:58 -0700
committer Linus Torvalds <[EMAIL PROTECTED]> Sun, 17 Apr 2005 05:23:58 -0700
[PATCH] crypto: call zlib end functions on deflate exit path
In the deflate_[compress|uncompress|pcompress] functions we call the
zlib_[in|de]flateReset function at the beginning. This is OK. But when we
unload the deflate module we don't call zlib_[in|de]flateEnd to free all
the zlib internal data. It looks like a bug for me. Please, consider the
attached patch.
Signed-off-by: Artem B. Bityuckiy <[EMAIL PROTECTED]>
Signed-off-by: Herbert Xu <[EMAIL PROTECTED]>
Cc: "David S. Miller" <[EMAIL PROTECTED]>
Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
deflate.c | 2 ++
1 files changed, 2 insertions(+)
Index: crypto/deflate.c
===================================================================
--- 41cd169ef17e4388189a0f1c46abe88375a7ddd5/crypto/deflate.c (mode:100644
sha1:77d7655d316aed05ef28f211df4027370b9412f2)
+++ 74da3bcb6c603f2681182250007d38e0c2c620a3/crypto/deflate.c (mode:100644
sha1:bc73342cd1ecc253909440de480909b7eab10beb)
@@ -93,11 +93,13 @@
static void deflate_comp_exit(struct deflate_ctx *ctx)
{
+ zlib_deflateEnd(&ctx->comp_stream);
vfree(ctx->comp_stream.workspace);
}
static void deflate_decomp_exit(struct deflate_ctx *ctx)
{
+ zlib_inflateEnd(&ctx->decomp_stream);
kfree(ctx->decomp_stream.workspace);
}
-
To unsubscribe from this list: send the line "unsubscribe bk-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html