aboutsummaryrefslogtreecommitdiffstats
path: root/libarchive/archive_read_support_format_xar.c
diff options
context:
space:
mode:
Diffstat (limited to 'libarchive/archive_read_support_format_xar.c')
-rw-r--r--libarchive/archive_read_support_format_xar.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/libarchive/archive_read_support_format_xar.c b/libarchive/archive_read_support_format_xar.c
index c4dd915a2c0e..6ff9cc4be5ff 100644
--- a/libarchive/archive_read_support_format_xar.c
+++ b/libarchive/archive_read_support_format_xar.c
@@ -1229,8 +1229,7 @@ heap_add_entry(struct archive_read *a,
}
memcpy(new_pending_files, heap->files,
heap->allocated * sizeof(new_pending_files[0]));
- if (heap->files != NULL)
- free(heap->files);
+ free(heap->files);
heap->files = new_pending_files;
heap->allocated = new_size;
}