Skip to content

Fix GFile leak in thunar_transfer_job_move_file_with_rename

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

Leak report

Direct leak of 32 byte(s) in 1 object(s) allocated from:
    #0 0x608c011a4f39 in calloc (/usr/asan/bin/thunar+0x457f39)
    #1 0x792ad93d50ca in g_malloc0 glib/gmem.c:133:13
    #2 0x792ad9bb74ac in g_type_create_instance gobject/gtype.c:1933:17
    #3 0x792ad9b86a0d in g_object_new_internal gobject/gobject.c:2606:24
    #4 0x792ad9b8514b in g_object_new_with_properties gobject/gobject.c:2769:14
    #5 0x792ad9b8514b in g_object_new gobject/gobject.c:2415:12
    #6 0x792ad99ecb9f in _g_local_file_new gio/glocalfile.c:233:11
    #7 0x792ad99ecb9f in g_local_file_resolve_relative_path gio/glocalfile.c:538:11
    #8 0x608c012f1245 in thunar_io_jobs_util_next_renamed_file thunar/thunar-io-jobs-util.c:189:18
    #9 0x608c013f04b1 in thunar_transfer_job_move_file_with_rename thunar/thunar-transfer-job.c:1260:22
    #10 0x608c013f04b1 in thunar_transfer_job_move_file thunar/thunar-transfer-job.c:1338:29
    #11 0x608c013eed4d in thunar_transfer_job_execute thunar/thunar-transfer-job.c
    #12 0x792adb63f5f0 in exo_job_scheduler_job_func exo/exo-job.c:310:13
[...snip...]

Steps to reproduce

  1. mkdir -p rename-test/drop-here
  2. touch rename-test/1 rename-test/drop-here/1
  3. thunar rename-test
  4. Drop file 1 into the drop-here folder
  5. Choose Rename on the "Confirm to replace files" dialog

Testing

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

Merge request reports