summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorKeith Bostic <keith@wiredtiger.com>2014-05-12 07:04:26 -0400
committerKeith Bostic <keith@wiredtiger.com>2014-05-12 07:04:26 -0400
commit1803bc5121fde50b7ea771bc9d8adcfe359e0d87 (patch)
tree0c85467d6170143704a0ba98543e34f0c0d00366 /ext
parent9832ca392ca444a4e2eb856a09a3ea6cc1ea723f (diff)
downloadmongo-1803bc5121fde50b7ea771bc9d8adcfe359e0d87.tar.gz
Don't ignore the return value from deflateEnd.
Diffstat (limited to 'ext')
-rw-r--r--ext/compressors/zlib/zlib_compress.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/ext/compressors/zlib/zlib_compress.c b/ext/compressors/zlib/zlib_compress.c
index 6550ab51397..ce8a1bd5fc2 100644
--- a/ext/compressors/zlib/zlib_compress.c
+++ b/ext/compressors/zlib/zlib_compress.c
@@ -136,7 +136,10 @@ zlib_compress(WT_COMPRESSOR *compressor, WT_SESSION *session,
*result_lenp = zs.total_out;
} else
*compression_failed = 1;
- (void)deflateEnd(&zs);
+
+ if ((ret = deflateEnd(&zs)) != Z_OK && ret != Z_DATA_ERROR)
+ return (zlib_error(compressor, session, "deflateEnd", ret));
+
return (0);
}