Free leaked archive_string in create_filesystem_object()
diff --git a/libarchive/archive_write_disk_posix.c b/libarchive/archive_write_disk_posix.c
index 29d687b..49e79dc 100644
--- a/libarchive/archive_write_disk_posix.c
+++ b/libarchive/archive_write_disk_posix.c
@@ -2092,6 +2092,7 @@
archive_set_error(&a->archive, error_number, "%s",
error_string.s);
free(linkname_copy);
+ archive_string_free(&error_string);
/*
* EPERM is more appropriate than error_number for our
* callers
@@ -2104,6 +2105,7 @@
archive_set_error(&a->archive, error_number, "%s",
error_string.s);
free(linkname_copy);
+ archive_string_free(&error_string);
/*
* EPERM is more appropriate than error_number for our
* callers
@@ -2111,6 +2113,7 @@
return (EPERM);
}
free(linkname_copy);
+ archive_string_free(&error_string);
r = link(linkname, a->name) ? errno : 0;
/*
* New cpio and pax formats allow hardlink entries