Jacek Caban : wininet: Make sure to initialize the whole z_stream struct ( valgrind).

Alexandre Julliard julliard at winehq.org
Wed Jan 12 13:17:00 CST 2011


Module: wine
Branch: master
Commit: e86353fd30dcb0e02ba538c7f6a162480afc5fe0
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=e86353fd30dcb0e02ba538c7f6a162480afc5fe0

Author: Jacek Caban <jacek at codeweavers.com>
Date:   Wed Jan 12 15:31:55 2011 +0100

wininet: Make sure to initialize the whole z_stream struct (valgrind).

---

 dlls/wininet/http.c |   10 +---------
 1 files changed, 1 insertions(+), 9 deletions(-)

diff --git a/dlls/wininet/http.c b/dlls/wininet/http.c
index 9a49a94..c656b21 100644
--- a/dlls/wininet/http.c
+++ b/dlls/wininet/http.c
@@ -257,17 +257,9 @@ static void init_gzip_stream(http_request_t *req)
     gzip_stream_t *gzip_stream;
     int index, zres;
 
-    gzip_stream = HeapAlloc(GetProcessHeap(), 0, sizeof(gzip_stream_t));
+    gzip_stream = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(gzip_stream_t));
     gzip_stream->zstream.zalloc = wininet_zalloc;
     gzip_stream->zstream.zfree = wininet_zfree;
-    gzip_stream->zstream.opaque = NULL;
-    gzip_stream->zstream.next_in = NULL;
-    gzip_stream->zstream.avail_in = 0;
-    gzip_stream->zstream.next_out = NULL;
-    gzip_stream->zstream.avail_out = 0;
-    gzip_stream->buf_pos = 0;
-    gzip_stream->buf_size = 0;
-    gzip_stream->end_of_data = FALSE;
 
     zres = inflateInit2(&gzip_stream->zstream, 0x1f);
     if(zres != Z_OK) {




More information about the wine-cvs mailing list