changeset 22320:663cba20a5a5 v8.2.1709

patch 8.2.1709: Vim9: memory leak when using multiple closures Commit: https://github.com/vim/vim/commit/dec07510bbdf335a2de3d63591231a90ef3e4c80 Author: Bram Moolenaar <Bram@vim.org> Date: Fri Sep 18 23:11:10 2020 +0200 patch 8.2.1709: Vim9: memory leak when using multiple closures Problem: Vim9: memory leak when using multiple closures. Solution: Free the partial.
author Bram Moolenaar <Bram@vim.org>
date Fri, 18 Sep 2020 23:15:03 +0200
parents 5be7084cc245
children 44ebaac84a54
files src/version.c src/vim9execute.c
diffstat 2 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/version.c
+++ b/src/version.c
@@ -751,6 +751,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    1709,
+/**/
     1708,
 /**/
     1707,
--- a/src/vim9execute.c
+++ b/src/vim9execute.c
@@ -1830,6 +1830,7 @@ call_def_function(
 			    // TODO: use a garray_T on ectx.
 			    SOURCING_LNUM = iptr->isn_lnum;
 			    emsg("Multiple closures not supported yet");
+			    vim_free(pt);
 			    goto failed;
 			}
 			tv->v_type = VAR_PARTIAL;