diff --git a/src/tar.c b/src/tar.c index e096d156..fb1f6463 100644 --- a/src/tar.c +++ b/src/tar.c @@ -2940,10 +2940,7 @@ main (int argc, char **argv) /* There is little point to freeing, as we are about to exit, and freeing is more likely to cause than cure trouble. */ if (false) - { - free (archive_name_array); - xattrs_clear_setup (); - } + free (archive_name_array); if (exit_status == TAREXIT_FAILURE) error (0, 0, _("Exiting with failure status due to previous errors")); diff --git a/src/xattrs.c b/src/xattrs.c index 1683a531..5558293d 100644 --- a/src/xattrs.c +++ b/src/xattrs.c @@ -520,20 +520,6 @@ xattrs_mask_add (const char *mask, bool incl) mask_map->masks[mask_map->used++] = mask; } -static void -clear_mask_map (struct xattrs_mask_map *mask_map) -{ - if (mask_map->size) - free (mask_map->masks); -} - -void -xattrs_clear_setup (void) -{ - clear_mask_map (&xattrs_setup.incl); - clear_mask_map (&xattrs_setup.excl); -} - static bool xattrs_masked_out (const char *kw, bool archiving); /* get xattrs from file given by FILE_NAME or FD (when non-zero) diff --git a/src/xattrs.h b/src/xattrs.h index 71c37635..8ce7b661 100644 --- a/src/xattrs.h +++ b/src/xattrs.h @@ -26,9 +26,6 @@ to true/false if you want to add include/exclude pattern */ extern void xattrs_mask_add (const char *mask, bool incl); -/* clear helping structures when tar finishes */ -extern void xattrs_clear_setup (void); - extern void xattrs_acls_get (int parentfd, char const *file_name, struct tar_stat_info *st, int xisfile); extern void xattrs_selinux_get (int parentfd, char const *file_name,