After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 660676 - gdk: Plug leak in gdk_display_pointer_is_grabbed
gdk: Plug leak in gdk_display_pointer_is_grabbed
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Backend: X11
unspecified
Other All
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2011-10-02 07:55 UTC by drago01
Modified: 2011-10-03 12:11 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gdk: Plug leak in gdk_display_pointer_is_grabbed (1.98 KB, patch)
2011-10-02 07:55 UTC, drago01
committed Details | Review

Description drago01 2011-10-02 07:55:48 UTC
See patch.
Comment 1 drago01 2011-10-02 07:55:51 UTC
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)
Comment 2 Matthias Clasen 2011-10-03 11:55:13 UTC
Review of attachment 197996 [details] [review]:

Looks right.
Comment 3 drago01 2011-10-03 12:11:26 UTC
Attachment 197996 [details] pushed as 25e65dc - gdk: Plug leak in gdk_display_pointer_is_grabbed