mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Bug 798754 - Build fails with gcc 13 and glib > 2.76
GLib 2.76 introduced a no-discard warning on g_string_free if the second parameter is FALSE. This revealed a string leak and a correct usage that didn't use the return value.
This commit is contained in:
parent
b9c5416a00
commit
184669f517
@ -108,7 +108,7 @@ gnc_module_system_search_dirs(void)
|
|||||||
if (!escchar)
|
if (!escchar)
|
||||||
{
|
{
|
||||||
list = g_list_append(list, token->str);
|
list = g_list_append(list, token->str);
|
||||||
g_string_free(token, FALSE);
|
g_string_free(token, TRUE);
|
||||||
token = g_string_new(NULL);
|
token = g_string_new(NULL);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -126,8 +126,8 @@ gnc_module_system_search_dirs(void)
|
|||||||
}
|
}
|
||||||
if (token->len)
|
if (token->len)
|
||||||
{
|
{
|
||||||
list = g_list_append(list, token->str);
|
char *token_str = g_string_free (token, FALSE);
|
||||||
g_string_free(token, FALSE);
|
list = g_list_append(list, token_str);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user