]> granicus.if.org Git - zziplib/commitdiff
One more free() to avoid memory leak.
authorjmoellers <josef.moellers@suse.com>
Fri, 7 Sep 2018 11:55:35 +0000 (13:55 +0200)
committerjmoellers <josef.moellers@suse.com>
Fri, 7 Sep 2018 11:55:35 +0000 (13:55 +0200)
zzip/zip.c

index 51a1a4d93a60d746db454cbc428f9f1e7c68e7b2..bc6c0800e085262cceacf7bc6376a99dc6e1bfb1 100644 (file)
@@ -589,6 +589,8 @@ __zzip_parse_root_directory(int fd,
            free(hdr0);
        }
     }                           /* else zero (sane) entries */
+    else
+        free(hdr0);
 #  ifndef ZZIP_ALLOW_MODULO_ENTRIES
     return (entries != zz_entries) ? ZZIP_CORRUPTED : 0;
 #  else