From 96ca27a0ee8ae738cab9fb386984c75c6821e31a Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Mon, 17 Jul 2017 23:20:24 +0200 Subject: patch 8.0.0728: the terminal structure is never freed Problem: The terminal structure is never freed. Solution: Free the structure and unreference what it contains. --- src/buffer.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/buffer.c') diff --git a/src/buffer.c b/src/buffer.c index e8e1a6de0..dbd4d3ae9 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -859,6 +859,9 @@ free_buffer(buf_T *buf) #ifdef FEAT_JOB_CHANNEL channel_buffer_free(buf); #endif +#ifdef FEAT_TERMINAL + free_terminal(buf->b_term); +#endif buf_hashtab_remove(buf); @@ -1771,7 +1774,7 @@ enter_buffer(buf_T *buf) #endif #ifdef FEAT_SYN_HL - curwin->w_s = &(buf->b_s); + curwin->w_s = &(curbuf->b_s); #endif /* Cursor on first line by default. */ -- cgit v1.2.1