]> git.ipfire.org Git - thirdparty/libarchive.git/commit
tar: fix memory leaks when processing symlinks or parsing pax headers (#2341)
authorMartin Matuška <martin@matuska.org>
Sun, 22 Sep 2024 23:04:09 +0000 (01:04 +0200)
committerGitHub <noreply@github.com>
Sun, 22 Sep 2024 23:04:09 +0000 (01:04 +0200)
commitde883f881cdb85cd91c20e29e8a0f4dd05caf485
treed25434335175968b2bd56a7cf3ec0c7dd864aa58
parent4aed70b797fcc1b1d45e9b7d3d8f5ff15754def0
tar: fix memory leaks when processing symlinks or parsing pax headers (#2341)

Fix memory leaks introduced by #2127:

* `struct tar` member `entry_linkpath` was moved at the same time as
other members were removed, but its cleanup was accidentally removed
with the others.

* `header_pax_extension` local variable `attr_name` was not cleaned up.

Resolves #2336

(cherry picked from commit 7c3980367e79c3f89e9ba595bbe67b3983b26215)

Co-authored-by: Brad King <brad.king@kitware.com>
libarchive/archive_read_support_format_tar.c