]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
Plug memory leak in XAR reader and one in XAR writer
authorMartin Matuska <martin@matuska.org>
Mon, 30 Jan 2017 15:46:29 +0000 (16:46 +0100)
committerMartin Matuska <martin@matuska.org>
Mon, 30 Jan 2017 15:46:29 +0000 (16:46 +0100)
libarchive/archive_read_support_format_xar.c
libarchive/archive_write_set_format_xar.c

index 6a314634f5c5daa06771097764795b87b7f9f973..d3002af718cf2858d10b2dbd1f642dcb1987dc3c 100644 (file)
@@ -933,6 +933,7 @@ xar_cleanup(struct archive_read *a)
        }
        for (i = 0; i < xar->file_queue.used; i++)
                file_free(xar->file_queue.files[i]);
+       free(xar->file_queue.files);
        while (xar->unknowntags != NULL) {
                struct unknown_tag *tag;
 
index c9f5ac23958238d9ae2565378a0fd8cc3b9b2238..495f0d441e5c1c3bd9462544943ae6d66a068c70 100644 (file)
@@ -1961,6 +1961,7 @@ file_free(struct file *file)
        archive_string_free(&(file->basename));
        archive_string_free(&(file->symlink));
        archive_string_free(&(file->script));
+       archive_entry_free(file->entry);
        free(file);
 }