aboutsummaryrefslogtreecommitdiffstats
path: root/libarchive/archive_write_set_format_cpio.c
diff options
context:
space:
mode:
Diffstat (limited to 'libarchive/archive_write_set_format_cpio.c')
-rw-r--r--libarchive/archive_write_set_format_cpio.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/libarchive/archive_write_set_format_cpio.c b/libarchive/archive_write_set_format_cpio.c
index a4c9d1ed276d..16cefad7b5b3 100644
--- a/libarchive/archive_write_set_format_cpio.c
+++ b/libarchive/archive_write_set_format_cpio.c
@@ -408,8 +408,7 @@ write_header(struct archive_write *a, struct archive_entry *entry)
}
}
exit_write_header:
- if (entry_main)
- archive_entry_free(entry_main);
+ archive_entry_free(entry_main);
return (ret_final);
}