Skip to content

Memory leaks with get_term #707

@correctmost

Description

@correctmost

Steps to reproduce

  1. Launch xfce4-terminal in a non-maximized state (my window is 80x24 columns)
  2. Run journalctl -b
  3. Maximize the terminal window
  4. Restore the terminal window to its previous size
  5. Press q to close the log

ASan log

Direct leak of 760 byte(s) in 1 object(s) allocated from:
    #0 0x7fc80f575d6d in calloc
    #1 0x7fc81005ffa0 in _nc_setupterm /usr/src/debug/ncurses/ncurses/ncurses/../ncurses/./tinfo/lib_setup.c:925:10
    #2 0x557014390e2a in get_term less/screen.c:1421:6
    #3 0x55701438eb35 in main less/main.c:350:2

Direct leak of 760 byte(s) in 1 object(s) allocated from:
    #0 0x7fc80f575d6d in calloc
    #1 0x7fc81005ffa0 in _nc_setupterm /usr/src/debug/ncurses/ncurses/ncurses/../ncurses/./tinfo/lib_setup.c:925:10
    #2 0x557014390e2a in get_term less/screen.c:1421:6
    #3 0x5570143fba2d in psignals less/signal.c:287:3
    #4 0x5570143ab11a in commands less/command.c:1419:4
    #5 0x55701438efec in main less/main.c:504:2

Version info

ac365da compiled on Arch Linux

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions