Fix memory leak when writing compressed sav files
authorJohn Darrington <john@darrington.wattle.id.au>
Wed, 3 Feb 2016 16:43:23 +0000 (17:43 +0100)
committerJohn Darrington <john@darrington.wattle.id.au>
Wed, 3 Feb 2016 16:43:23 +0000 (17:43 +0100)
src/data/sys-file-writer.c

index 05d42b080ea9152ae280f6b2ccc327f87a551608..3350a344854efcda877623822b7e9868b21898bb 100644 (file)
@@ -1420,6 +1420,7 @@ finish_zstream (struct sfm_writer *w)
   block = &w->blocks[w->n_blocks++];
   block->uncompressed_size = w->zstream.total_in;
   block->compressed_size = w->zstream.total_out;
+  deflateEnd (&w->zstream);
 }
 
 static void