The ISO9660 writer uses a temp_fd and closes it in the archive_free handler. The
same logic is added to the archive_free handlers for the 7zip and xar writers.
Signed-off-by: Paul Barker <paul@paulbarker.me.uk>
{
struct _7zip *zip = (struct _7zip *)a->format_data;
+ /* Close the temporary file. */
+ if (zip->temp_fd >= 0)
+ close(zip->temp_fd);
+
file_free_register(zip);
compression_end(&(a->archive), &(zip->stream));
free(zip->coder.props);
struct xar *xar;
xar = (struct xar *)a->format_data;
+
+ /* Close the temporary file. */
+ if (xar->temp_fd >= 0)
+ close(xar->temp_fd);
+
archive_string_free(&(xar->cur_dirstr));
archive_string_free(&(xar->tstr));
archive_string_free(&(xar->vstr));