From: Bram Moolenaar Date: Fri, 18 Sep 2020 21:11:10 +0000 (+0200) Subject: patch 8.2.1709: Vim9: memory leak when using multiple closures X-Git-Tag: v8.2.1709 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=dec07510bbdf335a2de3d63591231a90ef3e4c80;p=thirdparty%2Fvim.git patch 8.2.1709: Vim9: memory leak when using multiple closures Problem: Vim9: memory leak when using multiple closures. Solution: Free the partial. --- diff --git a/src/version.c b/src/version.c index 2701c79d71..60aa105995 100644 --- a/src/version.c +++ b/src/version.c @@ -750,6 +750,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 1709, /**/ 1708, /**/ diff --git a/src/vim9execute.c b/src/vim9execute.c index 5fe587892f..e4ccaaa8a1 100644 --- 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;