FreeBSD Bugzilla – Attachment 218084 Details for
Bug 249416
Each call to newlocale(3) with a non-null base argument results in additional memory usage
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
proposed patch
diff (text/plain), 801 bytes, created by
Mark Johnston
on 2020-09-19 18:09:03 UTC
(
hide
)
Description:
proposed patch
Filename:
MIME Type:
Creator:
Mark Johnston
Created:
2020-09-19 18:09:03 UTC
Size:
801 bytes
patch
obsolete
>diff --git a/lib/libc/locale/xlocale.c b/lib/libc/locale/xlocale.c >index c1995179463e..4bc0f5887f67 100644 >--- a/lib/libc/locale/xlocale.c >+++ b/lib/libc/locale/xlocale.c >@@ -251,6 +251,7 @@ static int dupcomponent(int type, locale_t base, locale_t new) > > locale_t newlocale(int mask, const char *locale, locale_t base) > { >+ locale_t _base; > int type; > const char *realLocale = locale; > int useenv = 0; >@@ -263,6 +264,7 @@ locale_t newlocale(int mask, const char *locale, locale_t base) > return (NULL); > } > >+ _base = base; > FIX_LOCALE(base); > copyflags(new, base); > >@@ -297,6 +299,8 @@ locale_t newlocale(int mask, const char *locale, locale_t base) > if (0 == success) { > xlocale_release(new); > new = NULL; >+ } else if (base == _base) { >+ xlocale_release(base); > } > > return (new);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 249416
:
218038
| 218084