Skip to content

Commit

Permalink
zlib: Call inflateEnd for Unzip objects
Browse files Browse the repository at this point in the history
  • Loading branch information
isaacs committed Jul 9, 2012
1 parent d3d83d7 commit e3aafac
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/node_zlib.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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_);
}

Expand Down

1 comment on commit e3aafac

@indutny
Copy link

@indutny indutny commented on e3aafac Jul 9, 2012

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Please sign in to comment.