Skip to content

Fix string leak in thunar_uca_editor_load

correctmost requested to merge correctmost/thunar:cm/fix-uca-leak into master

Leak report

Direct leak of 54 byte(s) in 1 object(s) allocated from:
    #0 0x5e1253574919 in malloc (/usr/asan/bin/thunar+0x498919) (BuildId: be31248f7d56c780)
    #1 0x73ce18cea438 in __vasprintf_internal /usr/src/debug/glibc/glibc/libio/vasprintf.c:116:16
    #2 0x73ce18f96043 in vasprintf /usr/include/bits/stdio2.h:275:10
    #3 0x73ce18f96043 in g_vasprintf /usr/src/debug/glib2/build/../glib/glib/gprintf.c:341:11
    #4 0x73ce18f63343 in g_strdup_vprintf /usr/src/debug/glib2/build/../glib/glib/gstrfuncs.c:511:3
    #5 0x73ce18f636a1 in g_strdup_printf /usr/src/debug/glib2/build/../glib/glib/gstrfuncs.c:541:12
    #6 0x73ce167a3b80 in thunar_uca_editor_load thunar/plugins/thunar-uca/thunar-uca-editor.c:612:28
    #7 0x73ce167a13fc in thunar_uca_chooser_open_editor thunar/plugins/thunar-uca/thunar-uca-chooser.c:276:5
    #8 0x73ce1679ed6b in thunar_uca_chooser_edit_clicked thunar/plugins/thunar-uca/thunar-uca-chooser.c:343:3
    #9 0x73ce18eb3e1b in _g_closure_invoke_va /usr/src/debug/glib2/build/../glib/gobject/gclosure.c:896:7
[...snip...]

Steps to reproduce

  • Edit > Configure custom actions
  • Edit an existing custom action to load the editor dialog

Testing

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

Merge request reports