Skip to content

Fix GFile leak in thunar_job_operation_restore_from_trash

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

Leak report

Direct leak of 40 byte(s) in 1 object(s) allocated from:
    #0 0x5a06cb0a0f39 in calloc (/usr/asan/bin/thunar+0x457f39)
    #1 0x7598ad1d50ca in g_malloc0 glib/gmem.c:133:13
    #2 0x7598ad9b74ac in g_type_create_instance gobject/gtype.c:1933:17
    #3 0x7598ad986a0d in g_object_new_internal gobject/gobject.c:2606:24
    #4 0x7598ad98514b in g_object_new_with_properties gobject/gobject.c:2769:14
    #5 0x7598ad98514b in g_object_new gobject/gobject.c:2415:12
    #6 0x7598ab9b2e4e in g_daemon_file_new client/gdaemonfile.c:116:17
    #7 0x7598ab9b2e4e in new_file_for_new_path client/gdaemonfile.c:235:14
    #8 0x7598ab9ae768 in g_daemon_file_resolve_relative_path client/gdaemonfile.c:381:11
    #9 0x5a06cb1f7ca9 in thunar_job_operation_restore_from_trash thunar/thunar-job-operation.c:745:26
    #10 0x5a06cb1f7ca9 in thunar_job_operation_execute thunar/thunar-job-operation.c:509:9
    #11 0x5a06cb1faa65 in thunar_job_operation_history_undo thunar/thunar-job-operation-history.c:371:26
    #12 0x5a06cb365af0 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