aboutsummaryrefslogtreecommitdiffstats
path: root/libarchive/archive_entry.c
diff options
context:
space:
mode:
Diffstat (limited to 'libarchive/archive_entry.c')
-rw-r--r--libarchive/archive_entry.c18
1 files changed, 6 insertions, 12 deletions
diff --git a/libarchive/archive_entry.c b/libarchive/archive_entry.c
index f722bbe85c74..5125a2eb284e 100644
--- a/libarchive/archive_entry.c
+++ b/libarchive/archive_entry.c
@@ -1560,10 +1560,8 @@ archive_entry_acl_text_compat(int *flags)
const wchar_t *
archive_entry_acl_text_w(struct archive_entry *entry, int flags)
{
- if (entry->acl.acl_text_w != NULL) {
- free(entry->acl.acl_text_w);
- entry->acl.acl_text_w = NULL;
- }
+ free(entry->acl.acl_text_w);
+ entry->acl.acl_text_w = NULL;
if (archive_entry_acl_text_compat(&flags) == 0)
entry->acl.acl_text_w = archive_acl_to_text_w(&entry->acl,
NULL, flags, entry->archive);
@@ -1574,10 +1572,8 @@ archive_entry_acl_text_w(struct archive_entry *entry, int flags)
const char *
archive_entry_acl_text(struct archive_entry *entry, int flags)
{
- if (entry->acl.acl_text != NULL) {
- free(entry->acl.acl_text);
- entry->acl.acl_text = NULL;
- }
+ free(entry->acl.acl_text);
+ entry->acl.acl_text = NULL;
if (archive_entry_acl_text_compat(&flags) == 0)
entry->acl.acl_text = archive_acl_to_text_l(&entry->acl, NULL,
flags, NULL);
@@ -1590,10 +1586,8 @@ int
_archive_entry_acl_text_l(struct archive_entry *entry, int flags,
const char **acl_text, size_t *len, struct archive_string_conv *sc)
{
- if (entry->acl.acl_text != NULL) {
- free(entry->acl.acl_text);
- entry->acl.acl_text = NULL;
- }
+ free(entry->acl.acl_text);
+ entry->acl.acl_text = NULL;
if (archive_entry_acl_text_compat(&flags) == 0)
entry->acl.acl_text = archive_acl_to_text_l(&entry->acl,