summaryrefslogtreecommitdiffstats
path: root/src/buffer.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2019-02-16 19:05:11 +0100
committerBram Moolenaar <Bram@vim.org>2019-02-16 19:05:11 +0100
commit55c77cf2ea9c15e1ec75d1faf702ec3c9e325271 (patch)
tree49838b82e5a5c75c477a716c692b8ce462b0b357 /src/buffer.c
parent8bfd9469cef536f171e6666f9d9217192e09d161 (diff)
patch 8.1.0936: may leak memory when using 'vartabstop'v8.1.0936
Problem: May leak memory when using 'vartabstop'. (Kuang-che Wu) Solution: Fix handling allocated memory for 'vartabstop'. (closes #3976)
Diffstat (limited to 'src/buffer.c')
-rw-r--r--src/buffer.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/buffer.c b/src/buffer.c
index db0c591613..49d38ed31d 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -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);