Skip to content

Fix string leak in thunar_job_operation_restore_from_trash

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

Leak report

Direct leak of 37 byte(s) in 1 object(s) allocated from:
    #0 0x61bb3c430919 in malloc (/usr/asan/bin/thunar+0x498919)
    #1 0x721ea1bd5062 in g_malloc glib/gmem.c:100:13
    #2 0x721ea1c118d2 in g_strdup glib/gstrfuncs.c:323:17
    #3 0x61bb3c64237d in thunar_job_operation_restore_from_trash thunar/thunar-job-operation.c:698:41
    #4 0x61bb3c641478 in thunar_job_operation_execute thunar/thunar-job-operation.c:509:9
    #5 0x61bb3c64692a in thunar_job_operation_history_undo thunar/thunar-job-operation-history.c:371:26
    #6 0x61bb3c8b73e8 in thunar_window_action_undo thunar/thunar-window.c:3750:3
[...snip...]

Steps to reproduce

  • Delete a file
  • Undo to restore the file from trash

Testing

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

Merge request reports