summaryrefslogtreecommitdiff
path: root/zlib.c
diff options
context:
space:
mode:
Diffstat (limited to 'zlib.c')
-rw-r--r--zlib.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/zlib.c b/zlib.c
index 61e6df0fdc..4223f1a8c5 100644
--- 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,