From 8006d69d3c05ef92f5915984baae79ef832380e5 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Tue, 2 Mar 2010 17:23:21 +0100 Subject: updated for version 7.2.382 Problem: Accessing freed memory when closing the cmdline window when 'bufhide' is set to "wipe". Solution: Check if the buffer still exists before invoking close_buffer() (Dominique Pelle) --- src/ex_getln.c | 6 +++++- src/version.c | 2 ++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/ex_getln.c b/src/ex_getln.c index 6b5a824bd..0f0f17075 100644 --- a/src/ex_getln.c +++ b/src/ex_getln.c @@ -6252,7 +6252,11 @@ ex_window() bp = curbuf; win_goto(old_curwin); win_close(wp, TRUE); - close_buffer(NULL, bp, DOBUF_WIPE); + + /* win_close() may have already wiped the buffer when 'bh' is + * set to 'wipe' */ + if (buf_valid(bp)) + close_buffer(NULL, bp, DOBUF_WIPE); /* Restore window sizes. */ win_size_restore(&winsizes); diff --git a/src/version.c b/src/version.c index d541e2d04..851d98b3c 100644 --- a/src/version.c +++ b/src/version.c @@ -681,6 +681,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 382, /**/ 381, /**/ -- cgit v1.2.3