Skip to content

window: Fix leak in terminal_window_menu_add_section

Leak report

Direct leak of 3718 byte(s) in 390 object(s) allocated from:
    #0 0x57f990427409 in malloc (/usr/asan/bin/xfce4-terminal+0x1f2409)
    #1 0x7de3ba7eb438 in __vasprintf_internal /usr/src/debug/glibc/glibc/libio/vasprintf.c:116:16
    #2 0x7de3bab96fc3 in vasprintf /usr/include/bits/stdio2.h:275:10
    #3 0x7de3bab96fc3 in g_vasprintf /usr/src/debug/glib2/build/../glib/glib/gprintf.c:341:11
    #4 0x7de3bab64243 in g_strdup_vprintf /usr/src/debug/glib2/build/../glib/glib/gstrfuncs.c:511:3
    #5 0x7de3bab645a1 in g_strdup_printf /usr/src/debug/glib2/build/../glib/glib/gstrfuncs.c:541:12
    #6 0x57f9904ccc87 in terminal_window_menu_add_section xfce4-terminal/terminal/terminal-window.c:3185:19
    #7 0x57f9904cf7a5 in terminal_window_update_terminal_menu xfce4-terminal/terminal/terminal-window.c:3343:3
[...snip...]

Steps to reproduce

  • Activate the Terminal > Send Signal menu

Testing

  • No issues were detected with LSan, ASan, or Valgrind when testing the patch
  • I verified that signals could still be sent via the menu

Merge request reports