aboutsummaryrefslogtreecommitdiff
path: root/lib/tar/cleanup.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/tar/cleanup.c')
-rw-r--r--lib/tar/cleanup.c12
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);