Permalink
Browse files

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)
  • Loading branch information...
brammool committed Jul 16, 2014
1 parent b643e77 commit 4e036c9e6f61ac9fca7be561da0a04d6fc36f9b8
Showing with 8 additions and 2 deletions.
  1. +2 −2 src/buffer.c
  2. +2 −0 src/version.c
  3. +4 −0 src/window.c
View
@@ -5702,8 +5702,8 @@ buf_delete_signs(buf)
signlist_T *next;
/* When deleting the last sign need to redraw the windows to remove the
* sign column. */
if (buf->b_signlist != NULL)
* sign column. Not when curwin is NULL (this means we're exiting). */
if (buf->b_signlist != NULL && curwin != NULL)
{
redraw_buf_later(buf, NOT_VALID);
changed_cline_bef_curs();
View
@@ -734,6 +734,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
369,
/**/
368,
/**/
View
@@ -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

0 comments on commit 4e036c9

Please sign in to comment.