# HG changeset patch # User Christian Brabandt # Date 1530735307 -7200 # Node ID 534836186b15e5523d0681f8ca1c1ee20c2210d0 # Parent cdb7b4fd094b6d5a4a952016270245ec5f3c38b6 patch 8.1.0148: memory leak when using :tcl expr command commit https://github.com/vim/vim/commit/92959fa46d305ded1da433ad6d9a8d38db240c74 Author: Bram Moolenaar Date: Wed Jul 4 22:12:25 2018 +0200 patch 8.1.0148: memory leak when using :tcl expr command Problem: Memory leak when using :tcl expr command. Solution: Free the result of expression evaluation. (Dominique Pelle, closes #3150) diff --git a/src/if_tcl.c b/src/if_tcl.c --- 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 --- 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,