diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/buffer.c | 5 | ||||
-rw-r--r-- | src/nvim/option.c | 4 |
2 files changed, 2 insertions, 7 deletions
diff --git a/src/nvim/buffer.c b/src/nvim/buffer.c index 1daedb90b5..cc9f130bfc 100644 --- a/src/nvim/buffer.c +++ b/src/nvim/buffer.c @@ -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); diff --git a/src/nvim/option.c b/src/nvim/option.c index 7d21086fd4..3cc66f938b 100644 --- a/src/nvim/option.c +++ b/src/nvim/option.c @@ -3139,9 +3139,7 @@ ambw_end: if (errmsg == NULL) { long *oldarray = curbuf->b_p_vsts_array; if (tabstop_set(*varp, &(curbuf->b_p_vsts_array))) { - if (oldarray) { - xfree(oldarray); - } + xfree(oldarray); } else { errmsg = e_invarg; } |