]> granicus.if.org Git - vim/commitdiff
patch 8.0.0679: using freed memory v8.0.0679
authorBram Moolenaar <Bram@vim.org>
Mon, 26 Jun 2017 07:59:35 +0000 (09:59 +0200)
committerBram Moolenaar <Bram@vim.org>
Mon, 26 Jun 2017 07:59:35 +0000 (09:59 +0200)
Problem:    Using freed memory.
Solution:   Get the parent frame pointer earlier.

src/version.c
src/window.c

index 192165fc6ad8bef23e95bb82e74000181ceff6c6..0deebee23d77911a27dce9a16a59f8f95a2f6210 100644 (file)
@@ -764,6 +764,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    679,
 /**/
     678,
 /**/
index 8078e011d3557b8b4100277235baf493f8b0af60..192721708a10fa73fd39601ee4903f435cc798a8 100644 (file)
@@ -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)