Merge branch 'nd/doc-git-index-version' into maint
[gitweb.git] / zlib.c
diff --git a/zlib.c b/zlib.c
index 61e6df0fdce6dfaf38da7af996d7fe801db8f00c..4223f1a8c57a281d5e41c329a4f983a7bb3b57a0 100644 (file)
--- a/zlib.c
+++ b/zlib.c
@@ -159,6 +159,7 @@ void git_deflate_init(git_zstream *strm, int level)
 {
        int status;
 
+       memset(strm, 0, sizeof(*strm));
        zlib_pre_call(strm);
        status = deflateInit(&strm->z, level);
        zlib_post_call(strm);
@@ -172,6 +173,7 @@ static void do_git_deflate_init(git_zstream *strm, int level, int windowBits)
 {
        int status;
 
+       memset(strm, 0, sizeof(*strm));
        zlib_pre_call(strm);
        status = deflateInit2(&strm->z, level,
                                  Z_DEFLATED, windowBits,