mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-27 07:56:14 +01:00
Merge branch 'g_strerror_error_leak' into 'main'
Fix a memory leak in g_strerror See merge request GNOME/glib!3305
This commit is contained in:
commit
48e62795f6
@ -1369,7 +1369,10 @@ g_strerror (gint errnum)
|
||||
{
|
||||
msg = g_locale_to_utf8 (msg, -1, NULL, NULL, &error);
|
||||
if (error)
|
||||
g_print ("%s\n", error->message);
|
||||
{
|
||||
g_print ("%s\n", error->message);
|
||||
g_error_free (error);
|
||||
}
|
||||
}
|
||||
else if (msg == (const gchar *)buf)
|
||||
msg = g_strdup (buf);
|
||||
|
Loading…
Reference in New Issue
Block a user