iolog: memset() zstream at init time
authorJens Axboe <axboe@fb.com>
Thu, 19 May 2016 18:44:06 +0000 (12:44 -0600)
committerJens Axboe <axboe@fb.com>
Thu, 19 May 2016 18:44:06 +0000 (12:44 -0600)
Signed-off-by: Jens Axboe <axboe@fb.com>
iolog.c

diff --git a/iolog.c b/iolog.c
index 53dad39618288469d5988de3abd36973767e69e5..75958f2ea30c7e840caa81838c539f2e0134dab7 100644 (file)
--- a/iolog.c
+++ b/iolog.c
@@ -710,6 +710,7 @@ static int z_stream_init(z_stream *stream, int gz_hdr)
 {
        int wbits = 15;
 
 {
        int wbits = 15;
 
+       memset(stream, 0, sizeof(*stream));
        stream->zalloc = Z_NULL;
        stream->zfree = Z_NULL;
        stream->opaque = Z_NULL;
        stream->zalloc = Z_NULL;
        stream->zfree = Z_NULL;
        stream->opaque = Z_NULL;