diff options
author | Roger Dingledine <arma@torproject.org> | 2006-03-20 00:52:22 +0000 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2006-03-20 00:52:22 +0000 |
commit | 54ced294dfccd372e245224d09e13960d28e9dca (patch) | |
tree | 6c7ab9e127480e70ab64be8df89137ab4ada3f13 /src/common/torgzip.c | |
parent | b62f0091e41b9ea6f99f5fa19cb80e3bbb7b443c (diff) | |
download | tor-54ced294dfccd372e245224d09e13960d28e9dca.tar.gz tor-54ced294dfccd372e245224d09e13960d28e9dca.zip |
Resolve a memory leak on clients. This disables some
functionality that we might still want. Nick?
svn:r6200
Diffstat (limited to 'src/common/torgzip.c')
-rw-r--r-- | src/common/torgzip.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/common/torgzip.c b/src/common/torgzip.c index e2fa98ec7f..ec1b5489cf 100644 --- a/src/common/torgzip.c +++ b/src/common/torgzip.c @@ -204,12 +204,17 @@ tor_gzip_uncompress(char **out, size_t *out_len, case Z_STREAM_END: if (stream->avail_in == 0) goto done; +#if 0 /* There may be more compressed data here. */ + /* But if so, this is not the right way to find it. If + * we call inflateInit2 below, stream->state will get + * re-zcalloc'ed and we'll leak the old one. -RD */ if (inflateInit2(stream, method_bits(method)) != Z_OK) { log_warn(LD_GENERAL, "Error from inflateInit2: %s", stream->msg?stream->msg:"<no message>"); goto err; } +#endif break; case Z_OK: if (!complete_only && stream->avail_in == 0) |