Skip to content

window: Fix leak in terminal_window_get_working_directory

Leak report

Direct leak of 1 byte(s) in 1 object(s) allocated from:
    #0 0x57f990427409 in malloc (/usr/asan/bin/xfce4-terminal+0x1f2409)
    #1 0x7de3bab4504a in g_malloc /usr/src/debug/glib2/build/../glib/glib/gmem.c:100:13
    #2 0x7de3bab5b31a in g_strdup /usr/src/debug/glib2/build/../glib/glib/gstrfuncs.c:323:17
    #3 0x7de3bc0204ec in g_strdup_inline /usr/src/debug/glib2/build/../glib/glib/gstrfuncs.h:321:10
    #4 0x7de3bc0204ec in value_lcopy_string /usr/src/debug/glib2/build/../glib/gobject/gvaluetypes.c:315:17
    #5 0x7de3bc00ee69 in g_object_get_valist /usr/src/debug/glib2/build/../glib/gobject/gobject.c:3271:7
    #6 0x7de3bc00ee69 in g_object_get_valist /usr/src/debug/glib2/build/../glib/gobject/gobject.c:3241:1
    #7 0x7de3bc00f2bc in g_object_get /usr/src/debug/glib2/build/../glib/gobject/gobject.c:3366:3
    #8 0x57f9904da73d in terminal_window_get_working_directory xfce4-terminal/terminal/terminal-window.c:1539:3
    #9 0x57f9904d4860 in terminal_window_action_new_tab xfce4-terminal/terminal/terminal-window.c:1559:31
[...snip...]

Steps to reproduce

  • File > Open Tab

Testing

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

Merge request reports

Loading