vim-patch:8.0.0679

Problem:    Using freed memory.
Solution:   Get the parent frame pointer earlier.

41cc038ff8
This commit is contained in:
Justin M. Keyes 2017-06-27 02:32:08 +02:00 committed by James McCoy
parent f0a9b7ff63
commit 1fb3339844
2 changed files with 3 additions and 3 deletions

View File

@ -273,7 +273,7 @@ static const int included_patches[] = {
// 682, // 682,
// 681, // 681,
// 680, // 680,
// 679, 679,
678, 678,
// 677, // 677,
// 676, // 676,

View File

@ -1878,7 +1878,7 @@ int 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()) {
EMSG(_("E444: Cannot close last window")); EMSG(_("E444: Cannot close last window"));
@ -2030,7 +2030,7 @@ int 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, curwin->w_frame->fr_parent == win_frame->fr_parent, dir); win_equal(curwin, curwin->w_frame->fr_parent == win_frame, dir);
} else { } else {
win_comp_pos(); win_comp_pos();
} }