summaryrefslogtreecommitdiff
path: root/libarchive/archive_write_private.h
diff options
context:
space:
mode:
authorMartin Matuska <martin@matuska.org>2020-11-06 03:17:11 +0100
committerMartin Matuska <martin@matuska.org>2020-11-08 12:01:44 +0100
commit1963f1096a40307d6c27a2fe82d37cca1b920774 (patch)
treeeb3b18de50a6a3999baae8051c06bcb24e75b705 /libarchive/archive_write_private.h
parentf6154ee30278a98279891aa6e5705196337469b2 (diff)
downloadlibarchive-1963f1096a40307d6c27a2fe82d37cca1b920774.tar.gz
Introduce archive_write_open2() with free callback
The archive_write_open() function does not provide a free callback. Freeing was done by the close callback. When the open callback fails, the client filter is left in ARCHIVE_WRITE_FILTER_STATE_FATAL, the close callback is not called and unfreed resources may be left behind. Fixes #1456
Diffstat (limited to 'libarchive/archive_write_private.h')
-rw-r--r--libarchive/archive_write_private.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/libarchive/archive_write_private.h b/libarchive/archive_write_private.h
index 27cba039..155fdd73 100644
--- a/libarchive/archive_write_private.h
+++ b/libarchive/archive_write_private.h
@@ -89,6 +89,7 @@ struct archive_write {
archive_open_callback *client_opener;
archive_write_callback *client_writer;
archive_close_callback *client_closer;
+ archive_free_callback *client_freer;
void *client_data;
/*