aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2009-02-17 12:14:41 +0000
committerDaniel Stenberg <daniel@haxx.se>2009-02-17 12:14:41 +0000
commit4ad296c60b1188e21e861e800a84eee32f986a9e (patch)
treea2b4e7ccacbd11395dd66ec95045ef27d9ecdd7b
parent0517fa153cf549ddbf04c67952fbdb9b34a5cb4f (diff)
- A second follow-up change by Andre Guibert de Bruet to fix a related memory
leak like that fixed on the 14th. When zlib returns failure, we need to cleanup properly before returning error.
-rw-r--r--CHANGES4
-rw-r--r--lib/content_encoding.c2
2 files changed, 5 insertions, 1 deletions
diff --git a/CHANGES b/CHANGES
index 43756b60f..91d7c2f71 100644
--- a/CHANGES
+++ b/CHANGES
@@ -7,6 +7,10 @@
Changelog
Daniel Stenberg (17 Feb 2009)
+- A second follow-up change by Andre Guibert de Bruet to fix a related memory
+ leak like that fixed on the 14th. When zlib returns failure, we need to
+ cleanup properly before returning error.
+
- CURLOPT_FTP_CREATE_MISSING_DIRS can now be set to 2 in addition to 1 for
plain FTP connections, and it will then allow MKD to fail once and retry the
CWD afterwards. This is especially useful if you're doing many simultanoes
diff --git a/lib/content_encoding.c b/lib/content_encoding.c
index d2ad3f49f..9163f0bab 100644
--- a/lib/content_encoding.c
+++ b/lib/content_encoding.c
@@ -136,7 +136,7 @@ inflate_stream(struct connectdata *conn,
(void) inflateEnd(z); /* don't care about the return code */
if(inflateInit2(z, -MAX_WBITS) != Z_OK) {
free(decomp);
- return process_zlib_error(conn, z);
+ return exit_zlib(z, &k->zlib_init, process_zlib_error(conn, z));
}
z->next_in = orig_in;
z->avail_in = nread;