0
0
mirror of https://github.com/vim/vim.git synced 2025-09-24 03:44:06 -04:00

patch 8.1.0936: may leak memory when using 'vartabstop'

Problem:    May leak memory when using 'vartabstop'. (Kuang-che Wu)
Solution:   Fix handling allocated memory for 'vartabstop'. (closes #3976)
This commit is contained in:
Bram Moolenaar
2019-02-16 19:05:11 +01:00
parent 8bfd9469ce
commit 55c77cf2ea
3 changed files with 12 additions and 7 deletions

View File

@@ -2170,9 +2170,7 @@ free_buf_options(
vim_free(buf->b_p_vsts_array);
buf->b_p_vsts_array = NULL;
clear_string_option(&buf->b_p_vts);
if (buf->b_p_vts_array)
vim_free(buf->b_p_vts_array);
buf->b_p_vts_array = NULL;
VIM_CLEAR(buf->b_p_vts_array);
#endif
#ifdef FEAT_KEYMAP
clear_string_option(&buf->b_p_keymap);