Skip to content

Commit dec0751

Browse files
committed
patch 8.2.1709: Vim9: memory leak when using multiple closures
Problem: Vim9: memory leak when using multiple closures. Solution: Free the partial.
1 parent b185a40 commit dec0751

2 files changed

Lines changed: 3 additions & 0 deletions

File tree

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -750,6 +750,8 @@ static char *(features[]) =
750750

751751
static int included_patches[] =
752752
{ /* Add new patch number below this line */
753+
/**/
754+
1709,
753755
/**/
754756
1708,
755757
/**/

src/vim9execute.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1830,6 +1830,7 @@ call_def_function(
18301830
// TODO: use a garray_T on ectx.
18311831
SOURCING_LNUM = iptr->isn_lnum;
18321832
emsg("Multiple closures not supported yet");
1833+
vim_free(pt);
18331834
goto failed;
18341835
}
18351836
tv->v_type = VAR_PARTIAL;

0 commit comments

Comments
 (0)