vim-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 vim/vim#3976)
55c77cf2ea
This commit is contained in:
VVKot
2021-02-02 06:57:54 +00:00
parent 7fc58ec99a
commit a70d904ad0
2 changed files with 2 additions and 7 deletions

View File

@@ -1956,10 +1956,7 @@ void free_buf_options(buf_T *buf, int free_p_ff)
}
buf->b_p_vsts_array = NULL;
clear_string_option(&buf->b_p_vts);
if (buf->b_p_vts_array) {
xfree(buf->b_p_vts_array);
}
buf->b_p_vts_array = NULL;
XFREE_CLEAR(buf->b_p_vts_array);
clear_string_option(&buf->b_p_keymap);
keymap_ga_clear(&buf->b_kmap_ga);
ga_clear(&buf->b_kmap_ga);