Mercurial > vim
changeset 12672:4e846c9d61a8 v8.0.1214
patch 8.0.1214: accessing freed memory when EXITFREE is set
commit https://github.com/vim/vim/commit/4f1982800f0aff28df6875e718a786f6c4b11ad9
Author: Bram Moolenaar <Bram@vim.org>
Date: Mon Oct 23 21:53:30 2017 +0200
patch 8.0.1214: accessing freed memory when EXITFREE is set
Problem: Accessing freed memory when EXITFREE is set and there is more than
one tab and window. (Dominique Pelle)
Solution: Free options later. Skip redraw when exiting.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Mon, 23 Oct 2017 22:00:05 +0200 |
parents | cb54d8bb3344 |
children | 2b845e7b9727 |
files | src/misc2.c src/screen.c src/version.c |
diffstat | 3 files changed, 6 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/misc2.c +++ b/src/misc2.c @@ -1135,7 +1135,6 @@ free_all_mem(void) free_all_autocmds(); # endif clear_termcodes(); - free_all_options(); free_all_marks(); alist_clear(&global_alist); free_homedir(); @@ -1196,6 +1195,9 @@ free_all_mem(void) /* Destroy all windows. Must come before freeing buffers. */ win_free_all(); + /* Free all option values. Must come after closing windows. */ + free_all_options(); + /* Free all buffers. Reset 'autochdir' to avoid accessing things that * were freed already. */ #ifdef FEAT_AUTOCHDIR