mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Valgrind: fix "Mismatched free/delete" - test-kvp-frames etc.
- test-kvp-frames - test-xml-account - test-xml-transaction - test-account-object - test-group-vs-book - test-lots - test-query - test-import-pending-matches ==30223== Mismatched free() / delete / delete [] ==30223== at 0x4846AFF: operator delete(void*, unsigned long) (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so) ==30223== by 0x4E370AA: guid_free (guid.cpp:116) ... ==30223== Address 0x7ea4390 is 0 bytes inside a block of size 16 alloc'd ==30223== at 0x4843828: malloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so) ==30223== by 0x5032948: g_malloc (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7600.1) ==30223== by 0x11603A: get_random_guid (test-engine-stuff.cpp:209) ...
This commit is contained in:
parent
72c907bc9a
commit
4018ff1722
@ -204,12 +204,7 @@ get_random_time (void)
|
||||
GncGUID*
|
||||
get_random_guid(void)
|
||||
{
|
||||
GncGUID *ret;
|
||||
|
||||
ret = g_new(GncGUID, 1);
|
||||
guid_replace(ret);
|
||||
|
||||
return ret;
|
||||
return guid_new();
|
||||
}
|
||||
|
||||
/* ========================================================== */
|
||||
|
Loading…
Reference in New Issue
Block a user