]> git.ipfire.org Git - thirdparty/libarchive.git/commit
Introduce archive_write_open2() with free callback
authorMartin Matuska <martin@matuska.org>
Fri, 6 Nov 2020 02:17:11 +0000 (03:17 +0100)
committerMartin Matuska <martin@matuska.org>
Sun, 8 Nov 2020 11:01:44 +0000 (12:01 +0100)
commit1963f1096a40307d6c27a2fe82d37cca1b920774
treeeb3b18de50a6a3999baae8051c06bcb24e75b705
parentf6154ee30278a98279891aa6e5705196337469b2
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
libarchive/archive.h
libarchive/archive_write.c
libarchive/archive_write_open.3
libarchive/archive_write_open_fd.c
libarchive/archive_write_open_file.c
libarchive/archive_write_open_filename.c
libarchive/archive_write_open_memory.c
libarchive/archive_write_private.h