summaryrefslogtreecommitdiff
path: root/src/window.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2014-07-16 16:30:28 +0200
committerBram Moolenaar <Bram@vim.org>2014-07-16 16:30:28 +0200
commit4e036c9e6f61ac9fca7be561da0a04d6fc36f9b8 (patch)
treedb63d06f6b63fc178d25da66b5b40a1f40682116 /src/window.c
parentb643e777824c76034cbd8e77f603a0b98f2b26fb (diff)
downloadvim-git-4e036c9e6f61ac9fca7be561da0a04d6fc36f9b8.tar.gz
updated for version 7.4.369v7.4.369
Problem: Using freed memory when exiting while compiled with EXITFREE. Solution: Set curwin to NULL and check for that. (Dominique Pelle)
Diffstat (limited to 'src/window.c')
-rw-r--r--src/window.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/window.c b/src/window.c
index cbf0ff86b..de85739a0 100644
--- a/src/window.c
+++ b/src/window.c
@@ -2489,6 +2489,10 @@ win_free_all()
while (firstwin != NULL)
(void)win_free_mem(firstwin, &dummy, NULL);
+
+ /* No window should be used after this. Set curwin to NULL to crash
+ * instead of using freed memory. */
+ curwin = NULL;
}
#endif