From 4e036c9e6f61ac9fca7be561da0a04d6fc36f9b8 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Wed, 16 Jul 2014 16:30:28 +0200 Subject: updated for version 7.4.369 Problem: Using freed memory when exiting while compiled with EXITFREE. Solution: Set curwin to NULL and check for that. (Dominique Pelle) --- src/window.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/window.c') 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 -- cgit v1.2.1