1
0
forked from aniani/vim

patch 8.0.0679: using freed memory

Problem:    Using freed memory.
Solution:   Get the parent frame pointer earlier.
This commit is contained in:
Bram Moolenaar
2017-06-26 09:59:35 +02:00
parent 8eeeba8c02
commit 41cc038ff8
2 changed files with 4 additions and 3 deletions

View File

@@ -764,6 +764,8 @@ static char *(features[]) =
static int included_patches[] = static int included_patches[] =
{ /* Add new patch number below this line */ { /* Add new patch number below this line */
/**/
679,
/**/ /**/
678, 678,
/**/ /**/

View File

@@ -2282,7 +2282,7 @@ win_close(win_T *win, int free_buf)
int dir; int dir;
int help_window = FALSE; int help_window = FALSE;
tabpage_T *prev_curtab = curtab; tabpage_T *prev_curtab = curtab;
frame_T *win_frame = win->w_frame; frame_T *win_frame = win->w_frame->fr_parent;
if (last_window()) if (last_window())
{ {
@@ -2462,8 +2462,7 @@ win_close(win_T *win, int free_buf)
if (p_ea && (*p_ead == 'b' || *p_ead == dir)) if (p_ea && (*p_ead == 'b' || *p_ead == dir))
/* If the frame of the closed window contains the new current window, /* If the frame of the closed window contains the new current window,
* only resize that frame. Otherwise resize all windows. */ * only resize that frame. Otherwise resize all windows. */
win_equal(curwin, win_equal(curwin, curwin->w_frame->fr_parent == win_frame, dir);
curwin->w_frame->fr_parent == win_frame->fr_parent, dir);
else else
win_comp_pos(); win_comp_pos();
if (close_curwin) if (close_curwin)