Fix leaks when replacing existing file with new file or directory
Leak report
Direct leak of 11 byte(s) in 1 object(s) allocated from:
#0 0x7fd406172fc5 in malloc /usr/src/debug/compiler-rt/compiler-rt-20.1.6.src/lib/asan/asan_malloc_linux.cpp:67:3
#1 0x7fd404d98852 in g_malloc glib/glib/gmem.c:100:13
#2 0x7fd404e15fa4 in g_strdup glib/glib/gstrfuncs.c:323:17
#3 0x557eea9ae791 in g_strdup_inline /usr/local/include/glib-2.0/glib/gstrfuncs.h:321:10
#4 0x557eea9ae791 in _thunar_io_jobs_mkdir thunar/thunar/thunar-io-jobs.c:390:34
#5 0x557eeaa6c199 in thunar_simple_job_execute thunar/thunar/thunar-simple-job.c:121:13
[...snip...]
Direct leak of 11 byte(s) in 1 object(s) allocated from:
#0 0x7fd406172fc5 in malloc /usr/src/debug/compiler-rt/compiler-rt-20.1.6.src/lib/asan/asan_malloc_linux.cpp:67:3
#1 0x7fd404d98852 in g_malloc glib/glib/gmem.c:100:13
#2 0x7fd404e15fa4 in g_strdup glib/glib/gstrfuncs.c:323:17
#3 0x557eea9adb3f in g_strdup_inline /usr/local/include/glib-2.0/glib/gstrfuncs.h:321:10
#4 0x557eea9adb3f in _thunar_io_jobs_create thunar/thunar/thunar-io-jobs.c:212:34
#5 0x557eeaa6c199 in thunar_simple_job_execute thunar/thunar/thunar-simple-job.c:121:13
[...snip...]
Testing
- No issues were detected when testing the patch with UBSan, LSan, and ASan