aboutsummaryrefslogtreecommitdiff
path: root/archival/libunarchive
diff options
context:
space:
mode:
Diffstat (limited to 'archival/libunarchive')
-rw-r--r--archival/libunarchive/unarchive.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/archival/libunarchive/unarchive.c b/archival/libunarchive/unarchive.c
index 49908affb..312b498a1 100644
--- a/archival/libunarchive/unarchive.c
+++ b/archival/libunarchive/unarchive.c
@@ -192,7 +192,9 @@ char *extract_archive(FILE *src_stream, FILE *out_stream, const file_header_t *f
fprintf(out_stream, "%s\n", full_name);
}
- free(full_name);
+ if (prefix != NULL) {
+ free(full_name);
+ }
return(NULL); /* Maybe we should say if failed */
}