Skip to content

Fix a leak in statusbar code

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

Example leak report from Valgrind:

9 bytes in 3 blocks are definitely lost in loss record 764 of 16,167
   at 0x4843788: malloc (vg_replace_malloc.c:442)
   by 0x5665902: g_malloc (gmem.c:100)
   by 0x567AC94: g_strdup (gstrfuncs.c:323)
   by 0x1F5B6D: g_strdup_inline (gstrfuncs.h:321)
   by 0x1F5B6D: thunar_standard_view_get_statusbar_text (thunar-standard-view.c:1822)
   by 0x1F3E99: thunar_standard_view_get_property (thunar-standard-view.c:1159)
   by 0x5776C0B: UnknownInlinedFun (gobject.c:2137)
   by 0x5776C0B: g_object_get_property (gobject.c:3451)
   by 0x5765E85: on_source_notify (gbinding.c:539)
   by 0x576CC87: g_object_bind_property_full (gbinding.c:1364)
   by 0x576CF96: g_object_bind_property (gbinding.c:1424)
   by 0x2284AD: thunar_window_binding_create (thunar-window.c:2123)
   by 0x228992: thunar_window_switch_current_view (thunar-window.c:2195)
   by 0x22FAA4: thunar_window_replace_view (thunar-window.c:4126)

Testing

  • I verified the leak no longer shows up in Valgrind and LeakSanitizer
  • I verified no memory errors are reported by Valgrind and AddressSanitizer

Follow-ups

  • There are still some reported leaks in the statusbar code that need to be investigated

Merge request reports