forked from Mirrors/wine-wine
wininet: Don't free gzip_stream in HTTPREQ_CloseConnection.
parent
c19c009e48
commit
4dfec39b6f
|
@ -1545,6 +1545,14 @@ static void HTTPREQ_Destroy(object_header_t *hdr)
|
||||||
HeapFree(GetProcessHeap(), 0, lpwhr->pCustHeaders[i].lpszValue);
|
HeapFree(GetProcessHeap(), 0, lpwhr->pCustHeaders[i].lpszValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef HAVE_ZLIB
|
||||||
|
if(lpwhr->gzip_stream) {
|
||||||
|
if(!lpwhr->gzip_stream->end_of_data)
|
||||||
|
inflateEnd(&lpwhr->gzip_stream->zstream);
|
||||||
|
HeapFree(GetProcessHeap(), 0, lpwhr->gzip_stream);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
HeapFree(GetProcessHeap(), 0, lpwhr->pCustHeaders);
|
HeapFree(GetProcessHeap(), 0, lpwhr->pCustHeaders);
|
||||||
HeapFree(GetProcessHeap(), 0, lpwhr);
|
HeapFree(GetProcessHeap(), 0, lpwhr);
|
||||||
}
|
}
|
||||||
|
@ -1555,14 +1563,6 @@ static void HTTPREQ_CloseConnection(object_header_t *hdr)
|
||||||
|
|
||||||
TRACE("%p\n",lpwhr);
|
TRACE("%p\n",lpwhr);
|
||||||
|
|
||||||
#ifdef HAVE_ZLIB
|
|
||||||
if(lpwhr->gzip_stream) {
|
|
||||||
inflateEnd(&lpwhr->gzip_stream->zstream);
|
|
||||||
HeapFree(GetProcessHeap(), 0, lpwhr->gzip_stream);
|
|
||||||
lpwhr->gzip_stream = NULL;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (!NETCON_connected(&lpwhr->netConnection))
|
if (!NETCON_connected(&lpwhr->netConnection))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -2057,6 +2057,7 @@ static DWORD read_gzip_data(http_request_t *req, BYTE *buf, int size, BOOL sync,
|
||||||
if(zres == Z_STREAM_END) {
|
if(zres == Z_STREAM_END) {
|
||||||
TRACE("end of data\n");
|
TRACE("end of data\n");
|
||||||
req->gzip_stream->end_of_data = TRUE;
|
req->gzip_stream->end_of_data = TRUE;
|
||||||
|
inflateEnd(&req->gzip_stream->zstream);
|
||||||
}else if(zres != Z_OK) {
|
}else if(zres != Z_OK) {
|
||||||
WARN("inflate failed %d\n", zres);
|
WARN("inflate failed %d\n", zres);
|
||||||
if(!read)
|
if(!read)
|
||||||
|
|
Loading…
Reference in New Issue