diff options
author | Artem B. Bityuckiy <dedekind@infradead.org> | 2005-04-16 18:23:58 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-16 18:23:58 -0400 |
commit | 9ffb7146f0aa9c0070cda3d8701b0a89e34913d1 (patch) | |
tree | 74da3bcb6c603f2681182250007d38e0c2c620a3 /crypto/deflate.c | |
parent | d42ce812b8a32adddeee3a692005f82f95ff15a3 (diff) |
[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 <dedekind@infradead.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Cc: "David S. Miller" <davem@davemloft.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'crypto/deflate.c')
-rw-r--r-- | crypto/deflate.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/crypto/deflate.c b/crypto/deflate.c index 77d7655d316a..bc73342cd1ec 100644 --- a/crypto/deflate.c +++ b/crypto/deflate.c | |||
@@ -93,11 +93,13 @@ out_free: | |||
93 | 93 | ||
94 | static void deflate_comp_exit(struct deflate_ctx *ctx) | 94 | static void deflate_comp_exit(struct deflate_ctx *ctx) |
95 | { | 95 | { |
96 | zlib_deflateEnd(&ctx->comp_stream); | ||
96 | vfree(ctx->comp_stream.workspace); | 97 | vfree(ctx->comp_stream.workspace); |
97 | } | 98 | } |
98 | 99 | ||
99 | static void deflate_decomp_exit(struct deflate_ctx *ctx) | 100 | static void deflate_decomp_exit(struct deflate_ctx *ctx) |
100 | { | 101 | { |
102 | zlib_inflateEnd(&ctx->decomp_stream); | ||
101 | kfree(ctx->decomp_stream.workspace); | 103 | kfree(ctx->decomp_stream.workspace); |
102 | } | 104 | } |
103 | 105 | ||