Mercurial > vim
changeset 12401:eb8d5c4936f1 v8.0.1080
patch 8.0.1080: memory leak for eof_chars terminal option and buffer name
commit https://github.com/vim/vim/commit/74121231be50e245d18c64281fdef08e7ec1ed5b
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Sep 9 16:34:32 2017 +0200
patch 8.0.1080: memory leak for eof_chars terminal option and buffer name
Problem: Memory leak for eof_chars terminal option and buffer name.
Solution: Free job options. Free the buffer name
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sat, 09 Sep 2017 16:45:04 +0200 |
parents | 88b280ce8cfb |
children | 67ab87d334e9 |
files | src/terminal.c src/version.c |
diffstat | 2 files changed, 5 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/terminal.c +++ b/src/terminal.c @@ -38,6 +38,7 @@ * in tl_scrollback are no longer used. * * TODO: + * - check for memory leaks * - patch to use GUI or cterm colors for vterm. Yasuhiro, #2067 * - Redirecting output does not work on MS-Windows. * - implement term_setsize() @@ -393,6 +394,7 @@ term_start(typval_T *argvar, jobopt_T *o vim_snprintf((char *)p, len, "!%s (%d)", cmd, i); if (buflist_findname(p) == NULL) { + vim_free(curbuf->b_ffname); curbuf->b_ffname = p; break; } @@ -552,6 +554,7 @@ ex_terminal(exarg_T *eap) argvar[1].v_type = VAR_UNKNOWN; term_start(argvar, &opt, eap->forceit); vim_free(tofree); + vim_free(opt.jo_eof_chars); } /*