]> git.ipfire.org Git - thirdparty/libarchive.git/commit
open_filename: Free memory on error paths 2663/head
authorTobias Stoeckmann <tobias@stoeckmann.org>
Tue, 3 Jun 2025 15:51:28 +0000 (17:51 +0200)
committerTobias Stoeckmann <tobias@stoeckmann.org>
Thu, 5 Jun 2025 20:17:56 +0000 (22:17 +0200)
commit90c1e32a0da78fb298643d126afc1948d377f425
tree853a3156d5df467fefb9dc246a88c0fb5047ddb6
parenta8f93f2480a2a0511485e5a24cb975a0d205fec6
open_filename: Free memory on error paths

If opening a filename fails, make sure that allocated memory which is
not inserted into any remaining structure is freed.

Fixes https://github.com/libarchive/libarchive/issues/1949

Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
libarchive/archive_read_open_filename.c
libarchive/archive_write_open_filename.c