Skip to content

X11 memory leak and access fixes

Sebastian Keller requested to merge skeller/mutter:x11-memory-fixes into master

I hadn't run valgrind on a X11 session for a while, so here are fixes for some of the new issues it found. Nothing important though.

==377163== Invalid read of size 1
==377163==    at 0x593C228: translate_state (meta-seat-x11.c:1489)
==377163==    by 0x593C228: meta_seat_x11_query_state (meta-seat-x11.c:1570)
==377163==  Address 0x23720e44 is 0 bytes after a block of size 4 alloc'd
==377163==    at 0x483D805: malloc (vg_replace_malloc.c:307)
==377163==    by 0x6BEBDF6: XIQueryPointer (in /usr/lib64/libXi.so.6.1.0)
==377163== 4 bytes in 1 blocks are definitely lost in loss record 333 of 52,431
==377163==    at 0x483D805: malloc (vg_replace_malloc.c:307)
==377163==    by 0x6BEBDF6: XIQueryPointer (in /usr/lib64/libXi.so.6.1.0)
==377163==    by 0x593C19A: meta_seat_x11_query_state (meta-seat-x11.c:1537)
==377163== 70,125 (1,424 direct, 68,701 indirect) bytes in 1 blocks are definitely lost in loss record 52,375 of 52,431
==377163==    at 0x483FAE5: calloc (vg_replace_malloc.c:760)
==377163==    by 0x8D63579: xkb_x11_keymap_new_from_device (in /usr/lib64/libxkbcommon-x11.so.0.0.0)
==377163==    by 0x5934EF0: meta_backend_x11_get_keymap (meta-backend-x11.c:749)
==377163==    by 0x596C555: reload_modmap (keybindings.c:247)
==377163== 168 bytes in 3 blocks are definitely lost in loss record 41,083 of 52,431
==377163==    at 0x483D805: malloc (vg_replace_malloc.c:307)
==377163==    by 0x8B8C7F0: XRRGetPanning (in /usr/lib64/libXrandr.so.2.2.0)
==377163==    by 0x5936AB3: meta_crtc_xrandr_new (meta-crtc-xrandr.c:255)
Edited by Sebastian Keller

Merge request reports