Permalink
Browse files

zlib: Call inflateEnd for Unzip objects

Re: #2595
  • Loading branch information...
1 parent d3d83d7 commit e3aafac6c6df992141c1303af0ba11a71e8a946f @isaacs committed Jul 9, 2012
Showing with 2 additions and 1 deletion.
  1. +2 −1 src/node_zlib.cc
View
3 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_);
}

1 comment on commit e3aafac

@indutny

lgtm

Please sign in to comment.