Skip to content

Fix GHashTable leak in thunar_tree_view_model_file_count_callback

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

Leak report

Direct leak of 6048 byte(s) in 63 object(s) allocated from:
    #0 0x5ea78be14979 in malloc (/usr/asan/bin/thunar+0x498979)
    #1 0x7f92641d5062 in g_malloc glib/gmem.c:100:13
    #2 0x7f926418d7b4 in g_hash_table_new_full glib/ghash.c:1021:16
    #3 0x7f926418d7b4 in g_hash_table_new glib/ghash.c:984:10
    #4 0x5ea78c228be7 in thunar_tree_view_model_file_count_callback thunar/thunar-tree-view-model.c:2646:32
    #5 0x5ea78bfad151 in thunar_file_get_file_count thunar/thunar-file.c:3609:7
    #6 0x5ea78c224830 in thunar_tree_view_model_get_value thunar/thunar-tree-view-model.c:1294:34
[...snip...]

Steps to reproduce

  • Set "Show number of containing items" to "Always" in View > Configure Columns

Testing

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

Merge request reports

Loading