Skip to content

exo-icon-chooser-dialog: Fix icon leaks

correctmost requested to merge correctmost/exo:cm/fix-icon-leaks into master

Leak report

Direct leak of 24818 byte(s) in 909 object(s) allocated from:
    #0 0x63a95d657979 in malloc (/usr/asan/bin/thunar+0x498979)
    #1 0x770500edc04a in g_malloc /usr/src/debug/glib2/build/../glib/glib/gmem.c:100:13
    #2 0x770500ef231a in g_strdup /usr/src/debug/glib2/build/../glib/glib/gstrfuncs.c:323:17
    #3 0x770501c5ff85 in g_strdup_inline /usr/include/glib-2.0/glib/gstrfuncs.h:321:10
    #4 0x770501c5ff85 in add_key_to_list gtk/gtkicontheme.c:2589:34
    #5 0x770500ec304a in g_hash_table_foreach /usr/src/debug/glib2/build/../glib/glib/ghash.c:2128:10
    #6 0x770501c5fe77 in gtk_icon_theme_list_icons gtk/gtkicontheme.c:2654:3
    #7 0x770502b659da in exo_icon_chooser_model_icon_theme_changed exo/exo/exo-icon-chooser-model.c:512:11
    #8 0x770502b654c8 in _exo_icon_chooser_model_get_for_icon_theme exo/exo/exo-icon-chooser-model.c:705:7
    #9 0x770502b639dd in exo_icon_chooser_dialog_set_model exo/exo/exo-icon-chooser-dialog.c:368:11
    #10 0x770502b62769 in exo_icon_chooser_dialog_init exo/exo/exo-icon-chooser-dialog.c:285:3
[...snip...]

Direct leak of 24290 byte(s) in 899 object(s) allocated from:
    #0 0x63a95d657979 in malloc (/usr/asan/bin/thunar+0x498979)
    #1 0x770500edc04a in g_malloc /usr/src/debug/glib2/build/../glib/glib/gmem.c:100:13
    #2 0x770500ef231a in g_strdup /usr/src/debug/glib2/build/../glib/glib/gstrfuncs.c:323:17
    #3 0x770501c5ff85 in g_strdup_inline /usr/include/glib-2.0/glib/gstrfuncs.h:321:10
    #4 0x770501c5ff85 in add_key_to_list gtk/gtkicontheme.c:2589:34
    #5 0x770500ec304a in g_hash_table_foreach /usr/src/debug/glib2/build/../glib/glib/ghash.c:2128:10
    #6 0x770501c5fe77 in gtk_icon_theme_list_icons gtk/gtkicontheme.c:2654:3
    #7 0x770502b65daa in exo_icon_chooser_model_icon_theme_changed exo/exo/exo-icon-chooser-model.c:550:15
    #8 0x770502b654c8 in _exo_icon_chooser_model_get_for_icon_theme exo/exo/exo-icon-chooser-model.c:705:7
    #9 0x770502b639dd in exo_icon_chooser_dialog_set_model exo/exo/exo-icon-chooser-dialog.c:368:11
    #10 0x770502b62769 in exo_icon_chooser_dialog_init exo/exo/exo-icon-chooser-dialog.c:285:3
[...snip...]

Testing

  • No issues were detected with LSan, ASan, or Valgrind when testing the patch (with Thunar's UCA editor)

Merge request reports

Loading