Valgrind: fix "Mismatched free/delete" - test-dom-converters1

==32195== Mismatched free() / delete / delete []
==32195==    at 0x484620F: free (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
==32195==    by 0x146DB5: test_dom_tree_to_guid() (test-dom-converters1.cpp:251)
...
==32195==  Address 0x8043780 is 0 bytes inside a block of size 16 alloc'd
==32195==    at 0x4843FA3: operator new(unsigned long) (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
==32195==    by 0x503E06E: guid_malloc (guid.cpp:106)
==32195==    by 0x503E0D5: guid_copy (guid.cpp:123)
==32195==    by 0x503E1E7: guid_new (guid.cpp:154)
==32195==    by 0x147188: get_random_guid (test-engine-stuff.cpp:207)
==32195==    by 0x146D03: test_dom_tree_to_guid() (test-dom-converters1.cpp:237)
...
This commit is contained in:
Richard Cohen 2023-06-18 15:45:56 +01:00
parent e5a26e3c77
commit 2e861ab673

View File

@ -248,7 +248,7 @@ test_dom_tree_to_guid (void)
"dom_tree_to_guid");
xmlFreeNode (test_node);
g_free (test_guid1);
guid_free (test_guid1);
guid_free (test_guid2);
}
}