diff --git a/src/node_zlib.cc b/src/node_zlib.cc index 9a53df235d0..f518c98d423 100644 --- a/src/node_zlib.cc +++ b/src/node_zlib.cc @@ -63,7 +63,8 @@ class ZCtx : public ObjectWrap { ~ZCtx() { if (mode_ == DEFLATE || mode_ == GZIP || mode_ == DEFLATERAW) { (void)deflateEnd(&strm_); - } else if (mode_ == INFLATE || mode_ == GUNZIP || mode_ == INFLATERAW) { + } else if (mode_ == INFLATE || mode_ == GUNZIP || mode_ == INFLATERAW || + mode === UNZIP) { (void)inflateEnd(&strm_); }