summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2017-09-09 16:34:32 +0200
committerBram Moolenaar <Bram@vim.org>2017-09-09 16:34:32 +0200
commit74121231be50e245d18c64281fdef08e7ec1ed5b (patch)
tree3d70209aa8971337d45c3cb7a42490c2f0995772
parent09d6c3818d7451a659f4d12a4e974237fe823f7d (diff)
downloadvim-git-8.0.1080.tar.gz
patch 8.0.1080: memory leak for eof_chars terminal option and buffer namev8.0.1080
Problem: Memory leak for eof_chars terminal option and buffer name. Solution: Free job options. Free the buffer name
-rw-r--r--src/terminal.c3
-rw-r--r--src/version.c2
2 files changed, 5 insertions, 0 deletions
diff --git a/src/terminal.c b/src/terminal.c
index c4313eeab..258f4f09d 100644
--- 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 *opt, int forceit)
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);
}
/*
diff --git a/src/version.c b/src/version.c
index 94ba24dbb..989fe0427 100644
--- 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 */
/**/
+ 1080,
+/**/
1079,
/**/
1078,