mime: Fix xfce_mime_helper_category_to_string leak
Leak report
Direct leak of 22 byte(s) in 2 object(s) allocated from:
#0 0x57dd289631e9 in malloc (/usr/asan/bin/xfce4-mime-settings+0x17a1e9) (BuildId: 7d0b8dc626730f20)
#1 0x7a7ff8c62e4a in g_malloc /usr/src/debug/glib2/build/../glib/glib/gmem.c:100:13
#2 0x7a7ff8c7925a in g_strdup /usr/src/debug/glib2/build/../glib/glib/gstrfuncs.c:323:17
#3 0x57dd289ad0a1 in g_strdup_inline /usr/include/glib-2.0/glib/gstrfuncs.h:321:10
#4 0x57dd289ad0a1 in xfce_mime_helper_category_to_string xfce4-settings/dialogs/mime-settings/xfce-mime-helper-utils.c:85:12
#5 0x57dd289b1953 in xfce_mime_helper_database_set_default xfce4-settings/dialogs/mime-settings/xfce-mime-helper.c:823:22
#6 0x57dd289bcbf0 in menu_activate xfce4-settings/dialogs/mime-settings/xfce-mime-helper-chooser.c:369:12
#7 0x7a7ff8d60699 in g_closure_invoke /usr/src/debug/glib2/build/../glib/gobject/gclosure.c:834:7
[...snip...]
Testing
- No issues were detected with LSan, ASan, or Valgrind when testing the patch