https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93032

David Binderman <dcb314 at hotmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dcb314 at hotmail dot com

--- Comment #1 from David Binderman <dcb314 at hotmail dot com> ---
The resource leak is fixed by this patch:

Index: zlib/contrib/minizip/mztools.c
===================================================================
--- zlib/contrib/minizip/mztools.c      (revision 279700)
+++ zlib/contrib/minizip/mztools.c      (working copy)
@@ -38,7 +38,7 @@
   FILE* fpZip = fopen(file, "rb");
   FILE* fpOut = fopen(fileOut, "wb");
   FILE* fpOutCD = fopen(fileOutTmp, "wb");
-  if (fpZip != NULL &&  fpOut != NULL) {
+  if (fpZip != NULL &&  fpOut != NULL && fpOutCD != NULL) {
     int entries = 0;
     uLong totalBytes = 0;
     char header[30];

I am not sure if local patches to zlib are normally applied and kept
for future versions. I have given this patch to the zlib maintainers.

Reply via email to