From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2178) id 09BAD383A32F; Mon, 23 May 2022 09:08:41 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 09BAD383A32F Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Florian Weimer To: glibc-cvs@sourceware.org Subject: [glibc] locale: Call _nl_unload_locale from _nl_archive_subfreeres X-Act-Checkin: glibc X-Git-Author: Florian Weimer X-Git-Refname: refs/heads/master X-Git-Oldrev: 0060a6de5493aeb4af457511e9b9ab532a6930a5 X-Git-Newrev: 0b6342e769be6903f29da067f5cbcbfcc7c01b10 Message-Id: <20220523090841.09BAD383A32F@sourceware.org> Date: Mon, 23 May 2022 09:08:41 +0000 (GMT) X-BeenThere: glibc-cvs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Glibc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 May 2022 09:08:41 -0000 https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=0b6342e769be6903f29da067f5cbcbfcc7c01b10 commit 0b6342e769be6903f29da067f5cbcbfcc7c01b10 Author: Florian Weimer 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 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;