git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fedora kernel-2.6.17-1.2142_FC4 patched with stable patch-2.6.17.4-vs2.0.2-rc26.diff
[linux-2.6.git]
/
crypto
/
deflate.c
diff --git
a/crypto/deflate.c
b/crypto/deflate.c
index
77d7655
..
f209368
100644
(file)
--- 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;
int ret = 0;
struct z_stream_s *stream = &ctx->decomp_stream;
- stream->workspace = k
m
alloc(zlib_inflate_workspacesize(), GFP_KERNEL);
+ stream->workspace = k
z
alloc(zlib_inflate_workspacesize(), GFP_KERNEL);
if (!stream->workspace ) {
ret = -ENOMEM;
goto out;
}
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;
ret = zlib_inflateInit2(stream, -DEFLATE_DEF_WINBITS);
if (ret != Z_OK) {
ret = -EINVAL;
@@
-93,11
+92,13
@@
out_free:
static void deflate_comp_exit(struct deflate_ctx *ctx)
{
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)
{
vfree(ctx->comp_stream.workspace);
}
static void deflate_decomp_exit(struct deflate_ctx *ctx)
{
+ zlib_inflateEnd(&ctx->decomp_stream);
kfree(ctx->decomp_stream.workspace);
}
kfree(ctx->decomp_stream.workspace);
}