aboutsummaryrefslogtreecommitdiff
path: root/lib/http.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2009-05-11 09:55:28 +0000
committerDaniel Stenberg <daniel@haxx.se>2009-05-11 09:55:28 +0000
commit242a17b9e0e430ba5933f7b2ae5586233ec35f33 (patch)
tree374f0c965defded30a4b3102add2251450f10ada /lib/http.c
parent6e1632c60688a7c801bc25c8bb79bb937b605da8 (diff)
- Balint Szilakszi reported a memory leak when libcurl did gzip decompression
of streams that had some parts (legitimately) missing. We now provide and use a proper cleanup function for the content encoding submodule. http://curl.haxx.se/mail/lib-2009-05/0092.html
Diffstat (limited to 'lib/http.c')
-rw-r--r--lib/http.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/http.c b/lib/http.c
index 9c020396c..a17c6eba9 100644
--- a/lib/http.c
+++ b/lib/http.c
@@ -97,6 +97,7 @@
#include "strtoofft.h"
#include "multiif.h"
#include "rawstr.h"
+#include "content_encoding.h"
#define _MPRINTF_REPLACE /* use our functions only */
#include <curl/mprintf.h>
@@ -1917,6 +1918,8 @@ CURLcode Curl_http_done(struct connectdata *conn,
struct HTTP *http =data->state.proto.http;
(void)premature; /* not used */
+ Curl_unencode_cleanup(conn);
+
/* set the proper values (possibly modified on POST) */
conn->fread_func = data->set.fread_func; /* restore */
conn->fread_in = data->set.in; /* restore */