Permalink
Browse files

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)
  • Loading branch information...
brammool committed Aug 4, 2017
1 parent eb44a68 commit 8e5eece8c5f22a2235edeb743d06253f6c54cfdc
Showing with 6 additions and 1 deletion.
  1. +4 −1 src/terminal.c
  2. +2 −0 src/version.c
View
@@ -691,8 +691,11 @@ move_terminal_to_buffer(term_T *term)
VTermPos pos;
VTermScreenCell cell;
VTermScreenCell *p;
VTermScreen *screen = vterm_obtain_screen(term->tl_vterm);
VTermScreen *screen;
if (term->tl_vterm == NULL)
return;
screen = vterm_obtain_screen(term->tl_vterm);
for (pos.row = 0; pos.row < term->tl_rows; ++pos.row)
{
len = 0;
View
@@ -769,6 +769,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
859,
/**/
858,
/**/

0 comments on commit 8e5eece

Please sign in to comment.