summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2017-06-26 09:59:35 +0200
committerBram Moolenaar <Bram@vim.org>2017-06-26 09:59:35 +0200
commit41cc038ff83498c589c7d25b3d2984145528eb92 (patch)
tree88548674c5b0502bc67c8a36de87f09aee1cde00 /src
parent8eeeba8c025ff844e6514c4a60cec11bf1fc1b35 (diff)
patch 8.0.0679: using freed memoryv8.0.0679
Problem: Using freed memory. Solution: Get the parent frame pointer earlier.
Diffstat (limited to 'src')
-rw-r--r--src/version.c2
-rw-r--r--src/window.c5
2 files changed, 4 insertions, 3 deletions
diff --git a/src/version.c b/src/version.c
index 192165fc6a..0deebee23d 100644
--- a/src/version.c
+++ b/src/version.c
@@ -765,6 +765,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 679,
+/**/
678,
/**/
677,
diff --git a/src/window.c b/src/window.c
index 8078e011d3..192721708a 100644
--- a/src/window.c
+++ b/src/window.c
@@ -2282,7 +2282,7 @@ win_close(win_T *win, int free_buf)
int dir;
int help_window = FALSE;
tabpage_T *prev_curtab = curtab;
- frame_T *win_frame = win->w_frame;
+ frame_T *win_frame = win->w_frame->fr_parent;
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 the frame of the closed window contains the new current window,
* 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
win_comp_pos();
if (close_curwin)