[PATCH 12/26] locale: Call _nl_unload_locale from _nl_archive_subfreeres
Florian Weimer
fweimer@redhat.com
Thu Mar 17 19:30:21 GMT 2022
The function performs the same teps for ld_archive locales
(mapped from an archive), and this code is not performance-critical,
so the specialization does not add vale.
---
locale/loadarchive.c | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/locale/loadarchive.c b/locale/loadarchive.c
index e7c797bc70..5a2356707f 100644
--- a/locale/loadarchive.c
+++ b/locale/loadarchive.c
@@ -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;
--
2.35.1
More information about the Libc-alpha
mailing list