]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
Properly cleanup hardlinked list.
authorMichihiro NAKAJIMA <ggcueroad@gmail.com>
Sun, 6 Dec 2009 16:13:31 +0000 (11:13 -0500)
committerMichihiro NAKAJIMA <ggcueroad@gmail.com>
Sun, 6 Dec 2009 16:13:31 +0000 (11:13 -0500)
SVN-Revision: 1708

libarchive/archive_read_support_format_xar.c

index f4425fb6e526002ff30e1ce9fcc73f5b3cfb6680..ecf116de04b95cb3faecbd8bf9bc1f97f4997b6b 100644 (file)
@@ -832,11 +832,19 @@ static int
 xar_cleanup(struct archive_read *a)
 {
        struct xar *xar;
+       struct hdlink *hdlink;
        int i;
        int r = ARCHIVE_OK;
 
        xar = (struct xar *)(a->format->data);
        r = decompression_cleanup(a);
+       hdlink = xar->hdlink_list;
+       while (hdlink != NULL) {
+               struct hdlink *next = hdlink->next;
+
+               free(hdlink);
+               hdlink = next;
+       }
        for (i = 0; i < xar->file_queue.used; i++)
                file_free(xar->file_queue.files[i]);
        while (xar->unknowntags != NULL) {