mime: Fix xfce_str_replace leak
Leak report
Direct leak of 13184 byte(s) in 103 object(s) allocated from:
#0 0x56cf3ab3137a in realloc.part.0 (/usr/asan/bin/xfce4-mime-settings+0x17937a) (BuildId: 2ddc02f90da0fff4)
#1 0x74763e4e7c1a in g_realloc /usr/src/debug/glib2/build/../glib/glib/gmem.c:171:16
#2 0x74763e50de6a in g_string_expand /usr/src/debug/glib2/build/../glib/glib/gstring.c:82:17
#3 0x74763e50dee1 in g_string_sized_new /usr/src/debug/glib2/build/../glib/glib/gstring.c:113:3
#4 0x74763eb2195d in xfce_str_replace libxfce4util/libxfce4util/xfce-string.c:81:12
#5 0x56cf3ab8561c in xfce_mime_helper_new xfce4-settings/dialogs/mime-settings/xfce-mime-helper.c:237:24
#6 0x56cf3ab8007a in xfce_mime_helper_database_lookup xfce4-settings/dialogs/mime-settings/xfce-mime-helper.c:653:24
#7 0x56cf3ab82d02 in xfce_mime_helper_database_get_all xfce4-settings/dialogs/mime-settings/xfce-mime-helper.c:1139:16
#8 0x56cf3ab8a687 in xfce_mime_helper_chooser_pressed xfce4-settings/dialogs/mime-settings/xfce-mime-helper-chooser.c:707:13
#9 0x74763e5e4699 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