mirror of
https://github.com/boostorg/iostreams.git
synced 2026-02-22 03:22:24 +00:00
fixed memory leak
[SVN r29354]
This commit is contained in:
@@ -129,10 +129,14 @@ int zlib_base::inflate(int flush)
|
||||
return ::inflate(static_cast<z_stream*>(stream_), flush);
|
||||
}
|
||||
|
||||
void zlib_base::reset(bool compress)
|
||||
void zlib_base::reset(bool compress, bool realloc)
|
||||
{
|
||||
z_stream* s = static_cast<z_stream*>(stream_);
|
||||
zlib_error::check(compress ? deflateReset(s) : inflateReset(s));
|
||||
zlib_error::check(
|
||||
realloc ?
|
||||
(compress ? deflateReset(s) : inflateReset(s)) :
|
||||
(compress ? deflateEnd(s) : inflateEnd(s))
|
||||
);
|
||||
}
|
||||
|
||||
void zlib_base::do_init
|
||||
|
||||
Reference in New Issue
Block a user