GNOME Bugzilla – Bug 695130
CCallback leaks in test_gi.TestPythonGObject.test_callback_in_vfunc
Last modified: 2014-08-08 09:35:45 UTC
This test case leaks its CCallback: =24876== 128 bytes in 2 blocks are definitely lost in loss record 3,110 of 4,755 ==24876== at 0x4C2CD7B: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==24876== by 0x427DC8: PyType_GenericAlloc (typeobject.c:752) ==24876== by 0xA5434F1: _pygi_ccallback_new (pygi-ccallback.c:66) ==24876== by 0xA5420F5: _pygi_closure_convert_arguments (pygi-closure.c:338) ==24876== by 0xA542BE4: _pygi_closure_handle (pygi-closure.c:489) ==24876== by 0xB7229F6: ffi_closure_unix64_inner (in /usr/lib/x86_64-linux-gnu/libffi.so.6.0.1) ==24876== by 0xB722D7F: ffi_closure_unix64 (in /usr/lib/x86_64-linux-gnu/libffi.so.6.0.1) ==24876== by 0xD5F8F19: gi_marshalling_tests_object_call_vfunc_with_callback (gimarshallingtests.c:4126) ==24876== by 0xB722C17: ffi_call_unix64 (in /usr/lib/x86_64-linux-gnu/libffi.so.6.0.1) ==24876== by 0xB72257F: ffi_call (in /usr/lib/x86_64-linux-gnu/libffi.so.6.0.1) ==24876== by 0xA78AB86: g_callable_info_invoke (gicallableinfo.c:680) ==24876== by 0xA78C706: g_function_info_invoke (gifunctioninfo.c:274) ==24876== ==24876== LEAK SUMMARY: ==24876== definitely lost: 128 bytes in 2 blocks ==24876== indirectly lost: 0 bytes in 0 blocks
Simple fix, we just needed to call tp_free().
https://git.gnome.org/browse/pygobject/commit/?id=74dfec27c6