Signal handler closure are not being destroyed with the object instance
@sdroege
Submitted by Sebastian Dröge Link to original bug (#737976)
Description
Created attachment 287811 app.c
If you run the attached code in valgrind, you'll see the following leak (but the object itself, the bus is not leaked):
==532== 72 bytes in 1 blocks are possibly lost in loss record 1,552 of 2,296 ==532== at 0x4C2AD10: calloc (vg_replace_malloc.c:623) ==532== by 0x53E8821: g_malloc0 (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4200.0) ==532== by 0x5155144: g_closure_new_simple (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4200.0) ==532== by 0x5156601: g_cclosure_new (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4200.0) ==532== by 0x516E5C0: g_signal_connect_data (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4200.0) ==532== by 0x400FC2: main (app.c:110)
This looks like gsignal is not cleaning up all signal handler closures when the instance is freed, at least not in all cases. Sometimes it apparently does or we would see much more leaks :)
Attachment 287811, "app.c":
app.c