diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2018-10-28 12:45:30 +0100 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2019-08-12 02:17:49 +0200 |
commit | feee862064554a789891e3450762464a6ec2535d (patch) | |
tree | 584f771e8a0905f0fa628231fc1167f5a2c44ece /src/nvim/buffer.c | |
parent | 48dc6344d665a7537fb000ec64ab95a37faa07f3 (diff) | |
download | rneovim-feee862064554a789891e3450762464a6ec2535d.tar.gz rneovim-feee862064554a789891e3450762464a6ec2535d.tar.bz2 rneovim-feee862064554a789891e3450762464a6ec2535d.zip |
vim-patch:8.0.1193: crash when wiping buffer after getbufinfo()
Problem: Crash when wiping out a buffer after using getbufinfo().
(Yegappan Lakshmanan)
Solution: Remove b:changedtick from the buffer variables.
(Note: The test changes in vim-patch:8.0.1193 were already included.)
Diffstat (limited to 'src/nvim/buffer.c')
-rw-r--r-- | src/nvim/buffer.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/nvim/buffer.c b/src/nvim/buffer.c index a545112360..ee87411523 100644 --- a/src/nvim/buffer.c +++ b/src/nvim/buffer.c @@ -757,6 +757,8 @@ static void free_buffer(buf_T *buf) handle_unregister_buffer(buf); buf_free_count++; free_buffer_stuff(buf, true); + // b:changedtick uses an item in buf_T, remove it now. + tv_dict_item_remove(buf->b_vars, (dictitem_T *)&buf->changedtick_di); unref_var_dict(buf->b_vars); aubuflocal_remove(buf); tv_dict_unref(buf->additional_data); |