Skip to content

Commit 8e5eece

Browse files
committed
patch 8.0.0859: NULL pointer access when term_free_vterm called twice
Problem: NULL pointer access when term_free_vterm called twice. Solution: Return when tl_vterm is NULL. (Yasuhiro Matsumoto, closes #1934)
1 parent eb44a68 commit 8e5eece

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

src/terminal.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -691,8 +691,11 @@ move_terminal_to_buffer(term_T *term)
691691
VTermPos pos;
692692
VTermScreenCell cell;
693693
VTermScreenCell *p;
694-
VTermScreen *screen = vterm_obtain_screen(term->tl_vterm);
694+
VTermScreen *screen;
695695

696+
if (term->tl_vterm == NULL)
697+
return;
698+
screen = vterm_obtain_screen(term->tl_vterm);
696699
for (pos.row = 0; pos.row < term->tl_rows; ++pos.row)
697700
{
698701
len = 0;

src/version.c

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

770770
static int included_patches[] =
771771
{ /* Add new patch number below this line */
772+
/**/
773+
859,
772774
/**/
773775
858,
774776
/**/

0 commit comments

Comments
 (0)