From 69df6ea57d14ec6cb761b74931a343a14ce66a79 Mon Sep 17 00:00:00 2001 From: Richard Cohen Date: Wed, 5 Jul 2023 15:43:27 +0100 Subject: [PATCH] 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) --- libgnucash/engine/test/gtest-qofquerycore.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/libgnucash/engine/test/gtest-qofquerycore.cpp b/libgnucash/engine/test/gtest-qofquerycore.cpp index 2a5d340e8a..d428b9725a 100644 --- a/libgnucash/engine/test/gtest-qofquerycore.cpp +++ b/libgnucash/engine/test/gtest-qofquerycore.cpp @@ -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)