aboutsummaryrefslogtreecommitdiffstats
path: root/libarchive/archive_write_set_format_cpio_newc.c
diff options
context:
space:
mode:
Diffstat (limited to 'libarchive/archive_write_set_format_cpio_newc.c')
-rw-r--r--libarchive/archive_write_set_format_cpio_newc.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/libarchive/archive_write_set_format_cpio_newc.c b/libarchive/archive_write_set_format_cpio_newc.c
index 957f1a333a6a..2d923cc33061 100644
--- a/libarchive/archive_write_set_format_cpio_newc.c
+++ b/libarchive/archive_write_set_format_cpio_newc.c
@@ -366,8 +366,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);
}