Valgrind: fix "definitely lost" memory in test - test-qofquerycore

==87254== 40 (24 direct, 16 indirect) bytes in 1 blocks are definitely lost in loss record 107 of 242
==87254==    at 0x4843828: malloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
==87254==    by 0x503B948: g_malloc (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7600.1)
==87254==    by 0x502F909: g_list_prepend (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7600.1)
==87254==    by 0x194E83: QofQueryCoreTest_construct_predicate_guid_Test::TestBody() (gtest-qofquerycore.cpp:94)
This commit is contained in:
Richard Cohen 2023-07-05 15:43:27 +01:00
parent f1e889dbcb
commit 69df6ea57d

View File

@ -102,6 +102,7 @@ TEST_F(QofQueryCoreTest, construct_predicate_guid)
EXPECT_TRUE (guid_equal (guid, (const GncGUID*)pdata->guids->data));
EXPECT_EQ (NULL, pdata->guids->next);
qof_query_core_predicate_free ((QofQueryPredData*) pdata);
g_list_free_full (guidlist, (GDestroyNotify)guid_free);
}
TEST_F(QofQueryCoreTest, construct_predicate_int32)