summaryrefslogtreecommitdiff
path: root/src/GZipDecoder.cc
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2008-08-07 14:15:39 +0000
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2008-08-07 14:15:39 +0000
commitf8b4d0d1bd65598420a98a675b57dfbbd1241eb1 (patch)
tree381105ff2ae31dd0a6a6967b077b7aed690e336f /src/GZipDecoder.cc
parent747e9a0b23ea2c01f5d7a242acb44bca6082dc5c (diff)
2008-08-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Fixed memory leak * src/GZipDecoder.cc
Diffstat (limited to 'src/GZipDecoder.cc')
-rw-r--r--src/GZipDecoder.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/GZipDecoder.cc b/src/GZipDecoder.cc
index c102f21c..71089a58 100644
--- a/src/GZipDecoder.cc
+++ b/src/GZipDecoder.cc
@@ -49,6 +49,8 @@ GZipDecoder::~GZipDecoder()
void GZipDecoder::init()
{
+ _finished = false;
+ release();
_strm = new z_stream();
_strm->zalloc = Z_NULL;
_strm->zfree = Z_NULL;
@@ -66,6 +68,7 @@ void GZipDecoder::release()
{
if(_strm) {
inflateEnd(_strm);
+ delete _strm;
_strm = 0;
}
}