This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[PATCH] DCIGETTEXT: Do not make copy of localename
- From: fweimer at redhat dot com (Florian Weimer)
- To: libc-alpha at sourceware dot org
- Date: Mon, 19 Jun 2017 18:16:57 +0200
- Subject: [PATCH] DCIGETTEXT: Do not make copy of localename
- Authentication-results: sourceware.org; auth=none
- Authentication-results: ext-mx03.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com
- Authentication-results: ext-mx03.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=fweimer at redhat dot com
- Dkim-filter: OpenDKIM Filter v2.11.0 mx1.redhat.com EF05881F01
- Dmarc-filter: OpenDMARC Filter v1.3.2 mx1.redhat.com EF05881F01
2017-06-19 Florian Weimer <fweimer@redhat.com>
* intl/dcigettext.c (DCIGETTEXT): Do not make copy of localename.
It cannot change while __libc_setlocale_lock is acquired.
diff --git a/intl/dcigettext.c b/intl/dcigettext.c
index 3843b7c..d97746c 100644
--- a/intl/dcigettext.c
+++ b/intl/dcigettext.c
@@ -551,7 +551,7 @@ DCIGETTEXT (const char *domainname, const char *msgid1, const char *msgid2,
#ifdef HAVE_PER_THREAD_LOCALE
# ifndef IN_LIBGLOCALE
# ifdef _LIBC
- localename = strdupa (__current_locale_name (category));
+ localename = __current_locale_name (category);
# else
categoryname = category_to_name (category);
# define CATEGORYNAME_INITIALIZED