summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2018-07-04 22:12:25 +0200
committerBram Moolenaar <Bram@vim.org>2018-07-04 22:12:25 +0200
commit92959fa46d305ded1da433ad6d9a8d38db240c74 (patch)
tree884d690995fd94f8860fe8ab522902859625a48a /src
parent3b48b11c07b85520f4ca3566e92c3f6486509b72 (diff)
downloadvim-git-92959fa46d305ded1da433ad6d9a8d38db240c74.tar.gz
patch 8.1.0148: memory leak when using :tcl expr commandv8.1.0148
Problem: Memory leak when using :tcl expr command. Solution: Free the result of expression evaluation. (Dominique Pelle, closes #3150)
Diffstat (limited to 'src')
-rw-r--r--src/if_tcl.c3
-rw-r--r--src/version.c2
2 files changed, 5 insertions, 0 deletions
diff --git a/src/if_tcl.c b/src/if_tcl.c
index 690c6392b..9ecabf84c 100644
--- a/src/if_tcl.c
+++ b/src/if_tcl.c
@@ -1385,7 +1385,10 @@ tclvimexpr(
if (str == NULL)
Tcl_SetResult(interp, _("invalid expression"), TCL_STATIC);
else
+ {
Tcl_SetResult(interp, str, TCL_VOLATILE);
+ vim_free(str);
+ }
err = vimerror(interp);
#else
Tcl_SetResult(interp, _("expressions disabled at compile time"), TCL_STATIC);
diff --git a/src/version.c b/src/version.c
index 08a2e0409..156e8dcf3 100644
--- a/src/version.c
+++ b/src/version.c
@@ -790,6 +790,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 148,
+/**/
147,
/**/
146,