Skip to content

mime: Fix icon leaks

Leak report

Direct leak of 46752 byte(s) in 974 object(s) allocated from:
    #0 0x63f2d19f3529 in calloc (/usr/asan/bin/xfce4-mime-settings+0x17a529) (BuildId: 97ba2fdc3108e53c)
    #1 0x7dc66518bb62 in g_malloc0 /usr/src/debug/glib2/build/../glib/glib/gmem.c:133:13
    #2 0x7dc6658b67b5 in g_type_create_instance /usr/src/debug/glib2/build/../glib/gobject/gtype.c:1933:17
    #3 0x7dc66589b684 in g_object_new_internal /usr/src/debug/glib2/build/../glib/gobject/gobject.c:2606:24
    #4 0x7dc66589d97a in g_object_new_internal /usr/src/debug/glib2/build/../glib/gobject/gobject.c:2923:29
    #5 0x7dc66589d97a in g_object_new_valist /usr/src/debug/glib2/build/../glib/gobject/gobject.c:2945:16
    #6 0x7dc66589dd2f in g_object_new /usr/src/debug/glib2/build/../glib/gobject/gobject.c:2418:12
    #7 0x7dc6653261a7 in g_themed_icon_new_from_names /usr/src/debug/glib2/build/../glib/gio/gthemedicon.c:402:14
    #8 0x7dc66533bfe1 in g_content_type_get_icon_internal /usr/src/debug/glib2/build/../glib/gio/gcontenttype.c:584:17
    #9 0x63f2d1a5824a in xfce_mime_window_mime_model xfce4-settings/dialogs/mime-settings/xfce-mime-window.c:666:61
    #10 0x63f2d1a53d71 in xfce_mime_window_init xfce4-settings/dialogs/mime-settings/xfce-mime-window.c:190:18
    #11 0x7dc6658b6848 in g_type_create_instance /usr/src/debug/glib2/build/../glib/gobject/gtype.c:1951:5
    #12 0x7dc66589b5ea in g_object_constructor /usr/src/debug/glib2/build/../glib/gobject/gobject.c:2981:23
    #13 0x7dc66589b093 in g_object_new_with_custom_constructor /usr/src/debug/glib2/build/../glib/gobject/gobject.c:2524:12
    #14 0x7dc66589ccab in g_object_new_internal /usr/src/debug/glib2/build/../glib/gobject/gobject.c:2604:12
    #15 0x7dc66589ccab in g_object_new_with_properties /usr/src/debug/glib2/build/../glib/gobject/gobject.c:2769:14
    #16 0x7dc66589dd51 in g_object_new /usr/src/debug/glib2/build/../glib/gobject/gobject.c:2415:12
    #17 0x63f2d1a5345e in xfce_mime_window_new xfce4-settings/dialogs/mime-settings/xfce-mime-window.c:1290:10
    #18 0x63f2d1a3c0e4 in main xfce4-settings/dialogs/mime-settings/main.c:111:12
    #19 0x7dc664f1ce07 in __libc_start_call_main /usr/src/debug/glibc/glibc/csu/../sysdeps/nptl/libc_start_call_main.h:58:16
    #20 0x7dc664f1cecb in __libc_start_main /usr/src/debug/glibc/glibc/csu/../csu/libc-start.c:360:3
    #21 0x63f2d1907104 in _start (/usr/asan/bin/xfce4-mime-settings+0x8e104) (BuildId: 97ba2fdc3108e53c)

Testing

  • No issues were detected with LSan, ASan, or Valgrind when testing the patch
  • I verified icons still show up in the MIME Type widget

Merge request reports

Loading