diff options
author | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2019-07-04 12:43:57 +0200 |
---|---|---|
committer | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2019-07-04 13:42:06 +0200 |
commit | 6623b1fe4df1e2fceb27eff286a86cf36809b2bc (patch) | |
tree | 95dce50157ca3f79e3fdcfae901a124660f20e93 /lib/tar/cleanup.c | |
parent | 56c1be44b5f77b067994a6f8f6ef2b397d7acadc (diff) |
libtar: add support for xattr extensions
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'lib/tar/cleanup.c')
-rw-r--r-- | lib/tar/cleanup.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/tar/cleanup.c b/lib/tar/cleanup.c index c4d1734..a34c28b 100644 --- a/lib/tar/cleanup.c +++ b/lib/tar/cleanup.c @@ -12,8 +12,20 @@ void free_sparse_list(sparse_map_t *sparse) } } +void free_xattr_list(tar_xattr_t *list) +{ + tar_xattr_t *old; + + while (list != NULL) { + old = list; + list = list->next; + free(old); + } +} + void clear_header(tar_header_decoded_t *hdr) { + free_xattr_list(hdr->xattr); free_sparse_list(hdr->sparse); free(hdr->name); free(hdr->link_target); |