Mercurial > octave
changeset 32708:afca8eb09d65 stable
Fix memory leak in gzip.
* gzip.cc (gz::zipper::close): delete "m_strm" pointer created with new in
constructor.
author | Rik <rik@octave.org> |
---|---|
date | Mon, 08 Jan 2024 19:44:25 -0800 |
parents | 4c20b978380f |
children | faaed3d49ca1 c3a339799a27 |
files | libinterp/dldfcn/gzip.cc |
diffstat | 1 files changed, 1 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/libinterp/dldfcn/gzip.cc Mon Jan 08 16:39:55 2024 -0800 +++ b/libinterp/dldfcn/gzip.cc Mon Jan 08 19:44:25 2024 -0800 @@ -445,6 +445,7 @@ { if (deflateEnd (m_strm) != Z_OK) throw std::runtime_error ("failed to close zlib stream"); + delete m_strm; m_strm = nullptr; // We have no error handling for failing to close source, let