Skip to content

Fix string leak in thunar_thumbnailer_file_is_supported

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

Leak report

Direct leak of 64 byte(s) in 4 object(s) allocated from:
    #0 0x7aeff28fd891 in malloc /usr/src/debug/gcc/gcc/libsanitizer/asan/asan_malloc_linux.cpp:69
    #1 0x7aefee8b950d in g_malloc glib/gmem.c:100
    #2 0x5ffaeb98e5b1 in g_strdup_inline glib/gstrfuncs.h:317
    #3 0x5ffaeb98e5b1 in thunar_g_file_get_content_type thunar/thunar-gio-extensions.c:1772
    #4 0x5ffaeba7551f in thunar_thumbnailer_file_is_supported thunar/thunar-thumbnailer.c:856
    #5 0x5ffaeba7551f in thunar_thumbnailer_begin_job thunar/thunar-thumbnailer.c:462
    #6 0x5ffaeba780e5 in thunar_thumbnailer_queue_job_after_timeout thunar/thunar-thumbnailer.c:1064
    #7 0x7aefee89df13 in g_timeout_dispatch glib/gmain.c:5070
    #8 0x7aefee88ed06 in g_main_dispatch glib/gmain.c:3357
    #9 0x7aefee88ed06 in g_main_context_dispatch_unlocked glib/gmain.c:4208
    #10 0x7aefee89ba5a in g_main_context_iterate_unlocked glib/gmain.c:4273
    #11 0x7aefee89c6d7 in g_main_context_iteration glib/gmain.c:4338
    #12 0x7aefef82ecae in g_application_run gio/gapplication.c:2715
    #13 0x5ffaeb8f52a0 in main thunar/main.c:86

Testing

  • No issues were detected when testing the patch with UBSan, LSan, and ASan

Merge request reports

Loading