tree 1b9a67d111ac858e038716aa11a94243b2aee5da
parent 72097bfb06a7685b6f00252b494c7533b5a3b509
author Artem B. Bityuckiy <[EMAIL PROTECTED]> Tue Apr 12 08:24:34 2005
committer Linus Torvalds <[EMAIL PROTECTED]> Tue Apr 12 08:24:34 2005
[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
===================================================================
--- 992c10c0a2512dc7d63647312fcd2790af105e8e/crypto/deflate.c (mode:100644
sha1:a348c88e0fd2574c5e1f83c67ba5eb54d0bc136b)
+++ 1b9a67d111ac858e038716aa11a94243b2aee5da/crypto/deflate.c (mode:100644
sha1:57db79ec2e4da537e2aafceeb76ef876c302e9fc)
@@ -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