mirror of
https://github.com/Gnucash/gnucash.git
synced 2024-11-26 02:40:43 -06:00
Valgrind: fix "Mismatched free/delete" - test-query
==31803== Mismatched free() / delete / delete [] ==31803== at 0x484620F: free (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so) ==31803== by 0x1198CB: make_trans_query (test-engine-stuff.cpp:2030) ==31803== by 0x115898: test_trans_query(transaction_s*, void*) (test-query.cpp:40) ... ==31803== Address 0x7fed160 is 0 bytes inside a block of size 16 alloc'd ==31803== at 0x4843FA3: operator new(unsigned long) (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so) ==31803== by 0x4E3706E: guid_malloc (guid.cpp:106) ==31803== by 0x4E370D5: guid_copy (guid.cpp:123) ==31803== by 0x4E371E7: guid_new (guid.cpp:154) ==31803== by 0x115D64: get_random_guid (test-engine-stuff.cpp:207) ==31803== by 0x11984C: make_trans_query (test-engine-stuff.cpp:2023) ...
This commit is contained in:
parent
4018ff1722
commit
e5a26e3c77
@ -2027,7 +2027,7 @@ make_trans_query (Transaction *trans, TestQueryTypes query_types)
|
||||
xaccQueryAddAccountGUIDMatch (q, list, QOF_GUID_MATCH_ANY, QOF_QUERY_AND);
|
||||
|
||||
for (node = list; node; node = node->next)
|
||||
g_free (node->data);
|
||||
guid_free (static_cast<GncGUID*>(node->data));
|
||||
g_list_free (list);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user