mirror of
https://github.com/curl/curl.git
synced 2026-08-24 15:03:34 +03:00
- 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
This commit is contained in:
parent
6e1632c606
commit
242a17b9e0
6 changed files with 29 additions and 3 deletions
|
|
@ -414,4 +414,14 @@ Curl_unencode_gzip_write(struct connectdata *conn,
|
|||
return inflate_stream(conn, k);
|
||||
#endif
|
||||
}
|
||||
|
||||
void Curl_unencode_cleanup(struct connectdata *conn)
|
||||
{
|
||||
struct SessionHandle *data = conn->data;
|
||||
struct SingleRequest *k = &data->req;
|
||||
z_stream *z = &k->z;
|
||||
if(k->zlib_init != ZLIB_UNINIT)
|
||||
(void) exit_zlib(z, &k->zlib_init, CURLE_OK);
|
||||
}
|
||||
|
||||
#endif /* HAVE_LIBZ */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue