mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Fix potential crash in test-engine
==515314== Invalid read of size 1 ==515314== at 0x484AD67: __strcmp_sse42 (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so) ==515314== by 0x171D36: do_test_list_handler (unittest-support.c:181) ==515314== by 0x171DCE: test_list_handler (unittest-support.c:197) ==515314== by 0x51BD4C1: g_logv (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7600.1) ==515314== by 0x51BD7A2: g_log (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7600.1) ==515314== by 0x4D5D0D9: xaccSplitEqualCheckBal (Split.c:753) ==515314== by 0x4D5D841: xaccSplitEqual (Split.c:869) ==515314== by 0x4D647A5: xaccTransEqual (Transaction.c:981) ==515314== by 0x15C0E8: test_xaccTransEqual(Fixture*, void const*) (utest-Transaction.cpp:901) ... ==515314== Address 0x8725260 is 0 bytes inside a block of size 59 free'd ==515314== at 0x484620F: free (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so) ==515314== by 0x15BDB1: test_xaccTransEqual(Fixture*, void const*) (utest-Transaction.cpp:883) ... ==515314== Block was alloc'd at ==515314== at 0x4843828: malloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so) ==515314== by 0x5618677: __vasprintf_internal (vasprintf.c:116) ==515314== by 0x520E8C1: g_vasprintf (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7600.1) ==515314== by 0x51DBBE0: g_strdup_vprintf (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7600.1) ==515314== by 0x51DBC9C: g_strdup_printf (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7600.1) ==515314== by 0x15BBAC: test_xaccTransEqual(Fixture*, void const*) (utest-Transaction.cpp:879) ... ok 78 /engine/Transaction/xaccTransEqual
This commit is contained in:
parent
dc62959553
commit
bed43c7f3b
@ -881,6 +881,7 @@ test_xaccTransEqual (Fixture *fixture, gconstpointer pData)
|
||||
frame->set({"qux", "quux", "corge"}, new KvpValue(123.456));
|
||||
xaccTransCommitEdit (clone);
|
||||
g_free (cleanup->msg);
|
||||
cleanup->msg = NULL;
|
||||
g_free (check->msg);
|
||||
check->msg = g_strdup ("[xaccSplitEqual] GUIDs differ");
|
||||
auto split1 = xaccTransGetSplit (clone, 0);
|
||||
|
Loading…
Reference in New Issue
Block a user