public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
* [glibc] locale: Call _nl_unload_locale from _nl_archive_subfreeres
@ 2022-05-23  9:08 Florian Weimer
  0 siblings, 0 replies; only message in thread
From: Florian Weimer @ 2022-05-23  9:08 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=0b6342e769be6903f29da067f5cbcbfcc7c01b10

commit 0b6342e769be6903f29da067f5cbcbfcc7c01b10
Author: Florian Weimer <fweimer@redhat.com>
Date:   Mon May 23 10:08:18 2022 +0200

    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>

Diff:
---
 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;


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-05-23  9:08 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-23  9:08 [glibc] locale: Call _nl_unload_locale from _nl_archive_subfreeres Florian Weimer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).