Skip to content

Fix string leak in thunar_history_error_not_found

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

Leak report

Direct leak of 38 byte(s) in 1 object(s) allocated from:
    #0 0x5f639d36cbf9 in malloc (/usr/asan/bin/thunar+0x457bf9)
    #1 0x7c0a1ebd5062 in g_malloc glib/gmem.c:100:13
    #2 0x7c0a1ec118d2 in g_strdup glib/gstrfuncs.c:323:17
    #3 0x5f639d49f5eb in thunar_history_error_not_found thunar/thunar-history.c:302:10
    #4 0x5f639d49c033 in thunar_history_go_forward thunar/thunar-history.c:410:7
    #5 0x5f639d6365f9 in thunar_window_action_forward thunar/thunar-window.c:4338:3
[...snip...]

Steps to reproduce

  1. mkdir delete-me
  2. thunar ./
  3. Open the delete-me directory
  4. Press backspace to navigate back
  5. Delete the delete-me directory
  6. Go > Forward to trigger the history error dialog

Testing

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

Merge request reports