summaryrefslogtreecommitdiff
path: root/src/mongo/db/ftdc
diff options
context:
space:
mode:
authorMark Benvenuto <mark.benvenuto@mongodb.com>2019-03-22 15:53:43 -0400
committerMark Benvenuto <mark.benvenuto@mongodb.com>2019-03-22 15:53:43 -0400
commitadd02fb371a56a7802c31b643df5fd0c716f04c1 (patch)
tree13a9c3aad1389557b136962f3128d5017a05d515 /src/mongo/db/ftdc
parentdc747812eec3cff55b8a94d34eea80a97bbb8b6f (diff)
downloadmongo-add02fb371a56a7802c31b643df5fd0c716f04c1.tar.gz
SERVER-40142 Coverity analysis defect 112101: Double free
Diffstat (limited to 'src/mongo/db/ftdc')
-rw-r--r--src/mongo/db/ftdc/block_compressor.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/mongo/db/ftdc/block_compressor.cpp b/src/mongo/db/ftdc/block_compressor.cpp
index a06be219872..c128dcf115e 100644
--- a/src/mongo/db/ftdc/block_compressor.cpp
+++ b/src/mongo/db/ftdc/block_compressor.cpp
@@ -66,9 +66,7 @@ StatusWith<ConstDataRange> BlockCompressor::compress(ConstDataRange source) {
if (err != Z_STREAM_END) {
(void)deflateEnd(&stream);
- if (err != Z_OK) {
- return {ErrorCodes::ZLibError, str::stream() << "deflate failed with " << err};
- }
+ return {ErrorCodes::ZLibError, str::stream() << "deflate failed with " << err};
}
err = deflateEnd(&stream);