Always return an allocated gchar*

Returning the literal string will cause the caller to free unallocated
memory.
This commit is contained in:
Adam Wight 2023-11-05 23:58:01 +01:00
parent 5937b5d542
commit fbc183a544

View File

@ -145,7 +145,7 @@ gchar *gnc_path_get_localedir()
{
g_free (prefix);
g_free (locale_subdir);
return LOCALEDIR;
return g_strdup (LOCALEDIR);
}
else
{