gnc_account_list_name_violations elements must be freed

This commit is contained in:
Christopher Lam 2021-08-11 09:28:26 +08:00
parent 4c37f6d4ef
commit 40d886fa9d
3 changed files with 4 additions and 3 deletions

View File

@ -132,7 +132,7 @@ static gchar *gnc_account_separator_is_valid (const gchar *separator,
message = gnc_account_name_violations_errmsg (*normalized_separator,
conflict_accts);
g_list_free (conflict_accts);
g_list_free_full (conflict_accts, g_free);
return message;
}

View File

@ -1101,6 +1101,7 @@ RESTART:
invalid_account_names );
gnc_warning_dialog(parent, "%s", message);
g_free ( message );
g_list_free_full (invalid_account_names, g_free);
}
// Fix account color slots being set to 'Not Set', should run once on a book

View File

@ -283,8 +283,8 @@ gchar *gnc_account_name_violations_errmsg (const gchar *separator, GList* invali
* @param book Pointer to the book with accounts to verify
* @param separator The separator character to verify against
*
* @return A GList of invalid account names. Should be freed with g_list_free
* if no longer needed.
* @return A GList of invalid account names. Should be freed with
* g_list_free_full (value, g_free) when no longer needed.
*/
GList *gnc_account_list_name_violations (QofBook *book, const gchar *separator);