# HG changeset patch # User Christian Brabandt # Date 1501871404 -7200 # Node ID 052270a67371929d6679b93b459776d80417f06b # Parent bc0fee081e1e37e750ecbf7dbb7ee4598f4dff2b patch 8.0.0859: NULL pointer access when term_free_vterm called twice commit https://github.com/vim/vim/commit/8e5eece8c5f22a2235edeb743d06253f6c54cfdc Author: Bram Moolenaar Date: Fri Aug 4 20:29:53 2017 +0200 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 https://github.com/vim/vim/issues/1934) diff --git a/src/terminal.c b/src/terminal.c --- a/src/terminal.c +++ b/src/terminal.c @@ -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; diff --git a/src/version.c b/src/version.c --- a/src/version.c +++ b/src/version.c @@ -770,6 +770,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 859, +/**/ 858, /**/ 857,