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.
This commit is contained in:
Daniel Eklöf 2020-04-19 15:26:52 +02:00
parent 08485ce412
commit 5c4f5ab414
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F

View file

@ -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);