From 1e4204d522670a1d8b8ab85f1cfefa960547e8af Mon Sep 17 00:00:00 2001 From: Rich Felker Date: Wed, 9 Dec 2020 17:11:05 -0500 Subject: use libc-internal malloc for newlocale/freelocale this is necessary for MT-fork correctness now that the code runs under locale lock. it would not be hard to avoid, but __get_locale is already using libc-internal malloc anyway. this can be reconsidered during locale overhaul later if needed. --- src/locale/newlocale.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/locale/newlocale.c') diff --git a/src/locale/newlocale.c b/src/locale/newlocale.c index 12ae87d6..9ac3cd38 100644 --- a/src/locale/newlocale.c +++ b/src/locale/newlocale.c @@ -4,6 +4,11 @@ #include "locale_impl.h" #include "lock.h" +#define malloc __libc_malloc +#define calloc undef +#define realloc undef +#define free undef + static int default_locale_init_done; static struct __locale_struct default_locale, default_ctype_locale; -- cgit v1.2.1