diff options
author | Bram Moolenaar <Bram@vim.org> | 2017-07-17 23:20:24 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2017-07-17 23:20:24 +0200 |
commit | 96ca27a0ee8ae738cab9fb386984c75c6821e31a (patch) | |
tree | d4c986e7262a996a095f6b4b71601dfc361c57a5 /src/buffer.c | |
parent | 60d0e97497f1104b31f711072ef174af533b61fa (diff) |
patch 8.0.0728: the terminal structure is never freedv8.0.0728
Problem: The terminal structure is never freed.
Solution: Free the structure and unreference what it contains.
Diffstat (limited to 'src/buffer.c')
-rw-r--r-- | src/buffer.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/buffer.c b/src/buffer.c index e8e1a6de0a..dbd4d3ae96 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. */ |