Skip to content

shortcuts: Fix xfconf_channel_get_properties leak

Leak report

Direct leak of 96 byte(s) in 1 object(s) allocated from:
    #0 0x5f2926e3f599 in malloc (/usr/asan/bin/xfce4-keyboard-settings+0x178599) (BuildId: 0c0ef458ee422f03)
    #1 0x710f9f513e4a in g_malloc /usr/src/debug/glib2/build/../glib/glib/gmem.c:100:13
    #2 0x710f9f4f467b in g_hash_table_new_full /usr/src/debug/glib2/build/../glib/glib/ghash.c:1016:16
    #3 0x710f9f9dce74 in xfconf_gvariant_to_hash xfconf/common/xfconf-gvaluefuncs.c:678:18
    #4 0x710f9f9c745d in xfconf_channel_get_properties xfconf/xfconf/xfconf-channel.c:751:22
    #5 0x710fa0d4ae1e in xfce_shortcuts_provider_get_shortcuts libxfce4ui/libxfce4kbd-private/xfce-shortcuts-provider.c:533:16
    #6 0x5f2926e9065b in xfce_keyboard_settings_load_shortcuts xfce4-settings/dialogs/keyboard-settings/xfce-keyboard-settings.c:683:15
    #7 0x5f2926e8b2f1 in xfce_keyboard_settings_constructed xfce4-settings/dialogs/keyboard-settings/xfce-keyboard-settings.c:463:3
    #8 0x710f9f8c47f9 in g_object_new_internal /usr/src/debug/glib2/build/../glib/gobject/gobject.c:2657:5
    #9 0x710f9f8c5cfe in g_object_new_internal /usr/src/debug/glib2/build/../glib/gobject/gobject.c:2603:6
    #10 0x710f9f8c5cfe in g_object_new_with_properties /usr/src/debug/glib2/build/../glib/gobject/gobject.c:2769:14
    #11 0x710f9f8c6d51 in g_object_new /usr/src/debug/glib2/build/../glib/gobject/gobject.c:2415:12
    #12 0x5f2926e88bae in xfce_keyboard_settings_new xfce4-settings/dialogs/keyboard-settings/xfce-keyboard-settings.c:574:10
    #13 0x5f2926e88675 in main xfce4-settings/dialogs/keyboard-settings/main.c:113:14
    #14 0x710f9f2e5e07 in __libc_start_call_main /usr/src/debug/glibc/glibc/csu/../sysdeps/nptl/libc_start_call_main.h:58:16
    #15 0x710f9f2e5ecb in __libc_start_main /usr/src/debug/glibc/glibc/csu/../csu/libc-start.c:360:3
    #16 0x5f2926d534b4 in _start (/usr/asan/bin/xfce4-keyboard-settings+0x8c4b4) (BuildId: 0c0ef458ee422f03)

Steps to reproduce

  • Launch xfce4-keyboard-settings

Testing

  • No issues were detected with LSan, ASan, or Valgrind when testing the patch

Merge request reports