mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-27 22:46:15 +01:00
Plug memory leak on Windows
Intern the string returned from g_win32_getlocale() and then free it. Fixes bug #621168.
This commit is contained in:
parent
6720596544
commit
507c266c3b
@ -3111,9 +3111,12 @@ guess_category_value (const gchar *category_name)
|
|||||||
* by Windows and the Microsoft C runtime (in the "English_United
|
* by Windows and the Microsoft C runtime (in the "English_United
|
||||||
* States" format) translated into the Unixish format.
|
* States" format) translated into the Unixish format.
|
||||||
*/
|
*/
|
||||||
retval = g_win32_getlocale ();
|
{
|
||||||
if ((retval != NULL) && (retval[0] != '\0'))
|
char *locale = g_win32_getlocale ();
|
||||||
|
retval = g_intern_string (locale);
|
||||||
|
g_free (locale);
|
||||||
return retval;
|
return retval;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
|
Loading…
Reference in New Issue
Block a user