Skip to content

Fix ThunarRenamerPair leak when using bulk renamer

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

Leak report

Indirect leak of 60 byte(s) in 2 object(s) allocated from:
    #0 0x57888f9b6859 in malloc (/usr/asan/bin/thunar+0x498859)
    #1 0x7f0a373d5062 in g_malloc glib/gmem.c:100:13
    #2 0x7f0a374118d2 in g_strdup glib/gstrfuncs.c:323:17
    #3 0x57888fca3a02 in g_strdup_inline /usr/include/glib-2.0/glib/gstrfuncs.h:321:10
    #4 0x57888fca3a02 in thunar_renamer_pair_new thunar/thunar-renamer-pair.c:73:24
    #5 0x57888fca3446 in thunar_renamer_pair_copy thunar/thunar-renamer-pair.c:96:10
    #6 0x57888fca853c in thunar_renamer_progress_next_idle thunar/thunar-renamer-progress.c:280:112
    #7 0x7f0a373c1102 in g_main_dispatch glib/gmain.c:3357:27
    #8 0x7f0a373c1102 in g_main_context_dispatch_unlocked glib/gmain.c:4208:7
    #9 0x7f0a373c1dcf in g_main_context_iterate_unlocked glib/gmain.c:4273:5
    #10 0x7f0a373c2637 in g_main_loop_run glib/gmain.c:4475:5
    #11 0x57888fca611a in thunar_renamer_progress_run_helper thunar/thunar-renamer-progress.c:395:3
    #12 0x57888fca4fbe in thunar_renamer_progress_run thunar/thunar-renamer-progress.c:453:3
    #13 0x57888fc87d37 in thunar_renamer_dialog_response thunar/thunar-renamer-dialog.c:821:7
[...snip...]

Steps to reproduce

  • Use the bulk renamer to rename 2 files

Testing

  • No issues were detected with LSan, ASan, or Valgrind when testing the patch
  • I verified bulk renames still worked

Merge request reports

Loading