From 6af6f650d1999800e2fbb6bc5d587b4f917cb133 Mon Sep 17 00:00:00 2001 From: ac-stef Date: Sat, 22 Apr 2017 12:41:51 +0200 Subject: [PATCH] fix double free in opengzfile Now gzstream->open consistently does not keep a copy of the input stream in case of failure - no matter the type of failure. --- source/src/stream.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/src/stream.cpp b/source/src/stream.cpp index d68dde60..471b21c0 100644 --- a/source/src/stream.cpp +++ b/source/src/stream.cpp @@ -594,7 +594,7 @@ struct gzstream : stream if(reading) { - if(!checkheader()) { stopreading(); return false; } + if(!checkheader()) { stopreading(); file = NULL; return false; } } else if(writing) writeheader(); return true;