GNOME Bugzilla – Bug 660676
gdk: Plug leak in gdk_display_pointer_is_grabbed
Last modified: 2011-10-03 12:11:29 UTC
See patch.
Created attachment 197996 [details] [review] gdk: Plug leak in gdk_display_pointer_is_grabbed gdk_x11_device_manager_core_list_devices returns a new allocated list, which has to be freed. valgrind output: ==18686== 160,176 (80,088 direct, 80,088 indirect) bytes in 3,337 blocks are definitely lost in loss record 25,347 of 25,378 ==18686== at 0x4C256DD: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) ==18686== by 0x6CD7752: g_malloc (in /lib64/libglib-2.0.so.0.3000.0) ==18686== by 0x6CEE2B6: g_slice_alloc (in /lib64/libglib-2.0.so.0.3000.0) ==18686== by 0x6CCB37D: g_list_prepend (in /lib64/libglib-2.0.so.0.3000.0) ==18686== by 0x654CADA: gdk_x11_device_manager_core_list_devices (gdkdevicemanager-core-x11.c:836) ==18686== by 0x6531489: gdk_display_pointer_is_grabbed (gdkdisplay.c:1270) ==18686== by 0x5162E1E: filter_func (ui.c:140) ==18686== by 0x6558B50: gdk_event_apply_filters (gdkeventsource.c:83) ==18686== by 0x6558CB3: _gdk_x11_display_queue_events (gdkeventsource.c:197) ==18686== by 0x6530680: gdk_display_get_event (gdkdisplay.c:311) ==18686== by 0x65589F1: gdk_event_source_dispatch (gdkeventsource.c:356) ==18686== by 0x6CD0A0E: g_main_context_dispatch (in /lib64/libglib-2.0.so.0.3000.0)
Review of attachment 197996 [details] [review]: Looks right.
Attachment 197996 [details] pushed as 25e65dc - gdk: Plug leak in gdk_display_pointer_is_grabbed