From 5c4f5ab414143e1f743688b4db8a572f6609b56a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Sun, 19 Apr 2020 15:26:52 +0200 Subject: [PATCH] term: destroy: free scroll damage lists These lists are typically empty when we destroy the terminal. However, if we had queued up damage, and then manage to destroy the terminal instance before the last changes were rendered, then they will *not* be empty. Found by the address sanitizer. --- terminal.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/terminal.c b/terminal.c index b5156ca3..44234007 100644 --- a/terminal.c +++ b/terminal.c @@ -991,6 +991,9 @@ term_destroy(struct terminal *term) grid_row_free(term->alt.rows[row]); free(term->alt.rows); + tll_free(term->normal.scroll_damage); + tll_free(term->alt.scroll_damage); + free(term->window_title); tll_free_and_free(term->window_title_stack, free);