diff options
author | Bram Moolenaar <bram@vim.org> | 2011-11-30 15:40:56 +0100 |
---|---|---|
committer | Bram Moolenaar <bram@vim.org> | 2011-11-30 15:40:56 +0100 |
commit | 93f235107c4cf1de1dea26ad2fb7199539323e0a (patch) | |
tree | 503378094565f129fd8f86c3013264ebdaea4dff | |
parent | 994cafbf40114f306ddb1baf0ed8451944de5074 (diff) | |
download | vim-93f235107c4cf1de1dea26ad2fb7199539323e0a.tar.gz |
Problem: Accessing memory after it is freed when EXITFREE is defined.
Solution: Don't access curwin when firstwin is NULL. (Dominique Pelle)
-rw-r--r-- | src/buffer.c | 5 | ||||
-rw-r--r-- | src/version.c | 2 |
2 files changed, 5 insertions, 2 deletions
diff --git a/src/buffer.c b/src/buffer.c index d4a9c1ee..5b2ec687 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 1eadaec2..35b51988 100644 --- a/src/version.c +++ b/src/version.c @@ -715,6 +715,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 361, +/**/ 360, /**/ 359, |