Skip to content

Commit 41cc038

Browse files
committed
patch 8.0.0679: using freed memory
Problem: Using freed memory. Solution: Get the parent frame pointer earlier.
1 parent 8eeeba8 commit 41cc038

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -764,6 +764,8 @@ static char *(features[]) =
764764

765765
static int included_patches[] =
766766
{ /* Add new patch number below this line */
767+
/**/
768+
679,
767769
/**/
768770
678,
769771
/**/

src/window.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2282,7 +2282,7 @@ win_close(win_T *win, int free_buf)
22822282
int dir;
22832283
int help_window = FALSE;
22842284
tabpage_T *prev_curtab = curtab;
2285-
frame_T *win_frame = win->w_frame;
2285+
frame_T *win_frame = win->w_frame->fr_parent;
22862286

22872287
if (last_window())
22882288
{
@@ -2462,8 +2462,7 @@ win_close(win_T *win, int free_buf)
24622462
if (p_ea && (*p_ead == 'b' || *p_ead == dir))
24632463
/* If the frame of the closed window contains the new current window,
24642464
* only resize that frame. Otherwise resize all windows. */
2465-
win_equal(curwin,
2466-
curwin->w_frame->fr_parent == win_frame->fr_parent, dir);
2465+
win_equal(curwin, curwin->w_frame->fr_parent == win_frame, dir);
24672466
else
24682467
win_comp_pos();
24692468
if (close_curwin)

0 commit comments

Comments
 (0)