Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Valgrind: fix "Invalid read" - test-customer
==4028== Invalid read of size 8 ==4028== at 0x4E3F641: gncCustomerGetAddr (gncCustomer.c:579) ==4028== by 0x10A8EE: test_customer (test-customer.c:90) ... ==4028== Address 0x7e861b8 is 168 bytes inside a block of size 272 free'd ==4028== at 0x484620F: free (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so) ==4028== by 0x51526C3: g_type_free_instance (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.7600.1) ==4028== by 0x4E3EDD6: gncCustomerFree (gncCustomer.c:368) ==4028== by 0x4E3F57B: cust_free (gncCustomer.c:551) ==4028== by 0x4E8611E: qof_commit_edit_part2 (qofinstance.cpp:1034) ==4028== by 0x4E3F5D5: gncCustomerCommitEdit (gncCustomer.c:557) ==4028== by 0x4E3EC89: gncCustomerDestroy (gncCustomer.c:338) ==4028== by 0x10A7EC: test_customer (test-customer.c:71) ... ==4028== Block was alloc'd at ==4028== at 0x4848A13: calloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so) ==4028== by 0x5033550: g_malloc0 (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7600.1) ==4028== by 0x5157CBC: g_type_create_instance (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.7600.1) ==4028== by 0x513F20F: ??? (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.7600.1) ==4028== by 0x51407B7: g_object_new_with_properties (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.7600.1) ==4028== by 0x5141560: g_object_new (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.7600.1) ==4028== by 0x4E3EB0D: gncCustomerCreate (gncCustomer.c:309) ==4028== by 0x10A768: test_customer (test-customer.c:66) ... ==4028== Invalid read of size 8 ==4028== at 0x4E3F796: gncCustomerGetShipAddr (gncCustomer.c:633) ==4028== by 0x10A91D: test_customer (test-customer.c:91) ... ==4028== Address 0x7e86210 is 256 bytes inside a block of size 272 free'd ==4028== at 0x484620F: free (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so) ==4028== by 0x51526C3: g_type_free_instance (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.7600.1) ==4028== by 0x4E3EDD6: gncCustomerFree (gncCustomer.c:368) ==4028== by 0x4E3F57B: cust_free (gncCustomer.c:551) ==4028== by 0x4E8611E: qof_commit_edit_part2 (qofinstance.cpp:1034) ==4028== by 0x4E3F5D5: gncCustomerCommitEdit (gncCustomer.c:557) ==4028== by 0x4E3EC89: gncCustomerDestroy (gncCustomer.c:338) ==4028== by 0x10A7EC: test_customer (test-customer.c:71) ... ==4028== Block was alloc'd at ==4028== at 0x4848A13: calloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so) ==4028== by 0x5033550: g_malloc0 (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7600.1) ==4028== by 0x5157CBC: g_type_create_instance (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.7600.1) ==4028== by 0x513F20F: ??? (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.7600.1) ==4028== by 0x51407B7: g_object_new_with_properties (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.7600.1) ==4028== by 0x5141560: g_object_new (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.7600.1) ==4028== by 0x4E3EB0D: gncCustomerCreate (gncCustomer.c:309) ==4028== by 0x10A768: test_customer (test-customer.c:66) ...
- Loading branch information