projects
/
platform
/
upstream
/
nodejs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d3d83d7
)
zlib: Call inflateEnd for UNZIP. Fixes memory leak.
author
isaacs
<i@izs.me>
Mon, 9 Jul 2012 05:03:37 +0000
(22:03 -0700)
committer
isaacs
<i@izs.me>
Mon, 9 Jul 2012 05:22:01 +0000
(22:22 -0700)
Fix #2595
src/node_zlib.cc
patch
|
blob
|
history
diff --git
a/src/node_zlib.cc
b/src/node_zlib.cc
index
9a53df2
..
f04260c
100644
(file)
--- 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_);
}