mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
[qofbook] qof_book_use_split_action_for_num_field: free a char*
qof_instance_get allocates a new char* which must be freed.
This commit is contained in:
parent
6fd19f2eea
commit
e4d808e674
@ -1051,7 +1051,7 @@ qof_book_use_split_action_for_num_field (const QofBook *book)
|
||||
{
|
||||
// No cached value? Then do the expensive KVP lookup
|
||||
gboolean result;
|
||||
const char *opt = NULL;
|
||||
char *opt = NULL;
|
||||
qof_instance_get (QOF_INSTANCE (book),
|
||||
PARAM_NAME_NUM_FIELD_SOURCE, &opt,
|
||||
NULL);
|
||||
@ -1060,6 +1060,7 @@ qof_book_use_split_action_for_num_field (const QofBook *book)
|
||||
result = TRUE;
|
||||
else
|
||||
result = FALSE;
|
||||
g_free (opt);
|
||||
|
||||
// We need to const_cast the "book" argument into a non-const pointer,
|
||||
// but as we are dealing only with cache variables, I think this is
|
||||
|
Loading…
Reference in New Issue
Block a user