GNOME Bugzilla – Bug 703973
A GITypeInfo is leaked when setting user data for a callback
Last modified: 2013-07-10 22:43:55 UTC
_args_cache_generate sometimes does not unref a GITypeInfo. From make check.valgrind: ==21275== 10,080 (5,112 direct, 4,968 indirect) bytes in 71 blocks are definitely lost in loss record 19,803 of 19,938 ==21275== at 0x4C2C27B: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) ==21275== by 0x80A3106: g_malloc (gmem.c:104) ==21275== by 0x80BBCAF: g_slice_alloc (gslice.c:1016) ==21275== by 0x86148A9: _g_info_new_full (gibaseinfo.c:61) ==21275== by 0x861494E: g_info_new (gibaseinfo.c:80) ==21275== by 0x8614BDE: _g_type_info_new (gibaseinfo.c:151) ==21275== by 0x861478A: g_arg_info_get_type (giarginfo.c:307) ==21275== by 0x83F69B4: _args_cache_generate (pygi-cache.c:1361) ==21275== by 0x83F6EAB: _pygi_callable_cache_new (pygi-cache.c:1499) ==21275== by 0x83F4629: _wrap_g_callable_info_invoke (pygi-invoke.c:680) ==21275== by 0x4F0DF5C: PyEval_EvalFrameEx (in /usr/lib64/libpython3.3m.so.1.0) ==21275== by 0x4F12520: PyEval_EvalCodeEx (in /usr/lib64/libpython3.3m.so.1.0)
Created attachment 248882 [details] [review] Patch. Add a g_type_info_unref in the code path where it was missing.
Looks good. Thank you.