comparison src/buffer.c @ 15858:3a45b89639fb v8.1.0936

patch 8.1.0936: may leak memory when using 'vartabstop' commit https://github.com/vim/vim/commit/55c77cf2ea9c15e1ec75d1faf702ec3c9e325271 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Feb 16 19:05:11 2019 +0100 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 https://github.com/vim/vim/issues/3976)
author Bram Moolenaar <Bram@vim.org>
date Sat, 16 Feb 2019 19:15:06 +0100
parents 0d8291665b59
children ddd82b1c9e9d
comparison
equal deleted inserted replaced
15857:d06d39fecfea 15858:3a45b89639fb
2168 buf->b_p_vsts_nopaste = NULL; 2168 buf->b_p_vsts_nopaste = NULL;
2169 if (buf->b_p_vsts_array) 2169 if (buf->b_p_vsts_array)
2170 vim_free(buf->b_p_vsts_array); 2170 vim_free(buf->b_p_vsts_array);
2171 buf->b_p_vsts_array = NULL; 2171 buf->b_p_vsts_array = NULL;
2172 clear_string_option(&buf->b_p_vts); 2172 clear_string_option(&buf->b_p_vts);
2173 if (buf->b_p_vts_array) 2173 VIM_CLEAR(buf->b_p_vts_array);
2174 vim_free(buf->b_p_vts_array);
2175 buf->b_p_vts_array = NULL;
2176 #endif 2174 #endif
2177 #ifdef FEAT_KEYMAP 2175 #ifdef FEAT_KEYMAP
2178 clear_string_option(&buf->b_p_keymap); 2176 clear_string_option(&buf->b_p_keymap);
2179 keymap_clear(&buf->b_kmap_ga); 2177 keymap_clear(&buf->b_kmap_ga);
2180 ga_clear(&buf->b_kmap_ga); 2178 ga_clear(&buf->b_kmap_ga);