summaryrefslogtreecommitdiff
path: root/locale
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2022-05-23 10:08:18 +0200
committerFlorian Weimer <fweimer@redhat.com>2022-05-23 11:06:31 +0200
commit0b6342e769be6903f29da067f5cbcbfcc7c01b10 (patch)
treea062401c8ec0adb98bfffee8ed9ca65448fe42b4 /locale
parentstdio-common: Add tst-memstream-string for open_memstream overflow (diff)
downloadglibc-0b6342e769be6903f29da067f5cbcbfcc7c01b10.tar.gz
glibc-0b6342e769be6903f29da067f5cbcbfcc7c01b10.tar.bz2
glibc-0b6342e769be6903f29da067f5cbcbfcc7c01b10.zip
locale: Call _nl_unload_locale from _nl_archive_subfreeres
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>
Diffstat (limited to 'locale')
-rw-r--r--locale/loadarchive.c8
1 files changed, 1 insertions, 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;