aboutsummaryrefslogtreecommitdiff
path: root/src/common/torgzip.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2008-01-16 05:27:19 +0000
committerNick Mathewson <nickm@torproject.org>2008-01-16 05:27:19 +0000
commit4a3b7496f0c47b0d00c9744698eaa237e601b32a (patch)
treefdefeb3c864306cc52f3e9f5dadb8414f8a99187 /src/common/torgzip.c
parent24aae484c93b09c7fc735e53874f02a22e4b5b43 (diff)
downloadtor-4a3b7496f0c47b0d00c9744698eaa237e601b32a.tar
tor-4a3b7496f0c47b0d00c9744698eaa237e601b32a.tar.gz
r17639@catbus: nickm | 2008-01-15 19:09:21 -0500
Fix some hard to trigger but nonetheless real memory leaks spotted by an anonymous contributor. Needs review. Partial backport candidate. svn:r13147
Diffstat (limited to 'src/common/torgzip.c')
-rw-r--r--src/common/torgzip.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/common/torgzip.c b/src/common/torgzip.c
index 1fc301260..09e22bd2d 100644
--- a/src/common/torgzip.c
+++ b/src/common/torgzip.c
@@ -139,7 +139,7 @@ tor_gzip_compress(char **out, size_t *out_len,
*out_len = stream->total_out;
if (stream->total_out > out_size + 4097) {
/* If we're wasting more than 4k, don't. */
- tor_realloc(*out, stream->total_out + 1);
+ *out = tor_realloc(*out, stream->total_out + 1);
}
if (deflateEnd(stream)!=Z_OK) {
log_warn(LD_BUG, "Error freeing gzip structures");