]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
locale: Call _nl_unload_locale from _nl_archive_subfreeres
authorFlorian Weimer <fweimer@redhat.com>
Mon, 23 May 2022 08:08:18 +0000 (10:08 +0200)
committerFlorian Weimer <fweimer@redhat.com>
Mon, 23 May 2022 09:06:31 +0000 (11:06 +0200)
The function performs the same steps for ld_archive locales
(mapped from an archive), and this code is not performance-critical,
so the specialization does not add value.

Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
locale/loadarchive.c

index e7c797bc70a743c8a9c221e4f17386f935baceb7..5a2356707feb18bb5eece117fe7d46964a7b6712 100644 (file)
@@ -515,13 +515,7 @@ _nl_archive_subfreeres (void)
       free (dead->name);
       for (category = 0; category < __LC_LAST; ++category)
        if (category != LC_ALL && dead->data[category] != NULL)
-         {
-           /* _nl_unload_locale just does this free for the archive case.  */
-           if (dead->data[category]->private.cleanup)
-             (*dead->data[category]->private.cleanup) (dead->data[category]);
-
-           free (dead->data[category]);
-         }
+         _nl_unload_locale (dead->data[category]);
       free (dead);
     }
   archloaded = NULL;