From 89c7122c05c69222a22fe78f570264c6f91851b8 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Wed, 30 Nov 2011 15:40:56 +0100 Subject: updated for version 7.3.361 Problem: Accessing memory after it is freed when EXITFREE is defined. Solution: Don't access curwin when firstwin is NULL. (Dominique Pelle) --- src/buffer.c | 5 +++-- src/version.c | 2 ++ 2 files changed, 5 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/buffer.c b/src/buffer.c index d4a9c1eeb1..5b2ec6871f 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -567,8 +567,9 @@ buf_freeall(buf, flags) diff_buf_delete(buf); /* Can't use 'diff' for unloaded buffer. */ #endif #ifdef FEAT_SYN_HL - if (curwin->w_buffer == buf) - reset_synblock(curwin); /* remove any ownsyntax */ + /* Remove any ownsyntax, unless exiting. */ + if (firstwin != NULL && curwin->w_buffer == buf) + reset_synblock(curwin); #endif #ifdef FEAT_FOLDING diff --git a/src/version.c b/src/version.c index 1eadaec242..35b519885a 100644 --- a/src/version.c +++ b/src/version.c @@ -714,6 +714,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 361, /**/ 360, /**/ -- cgit v1.2.3