0
0
mirror of https://github.com/vim/vim.git synced 2025-09-24 03:44:06 -04:00

patch 8.2.0721: Vim9: leaking memory when skipping

Problem:    Vim9: leaking memory when skipping.
Solution:   Disable skipping in generate_ppconst().
This commit is contained in:
Bram Moolenaar
2020-05-09 16:44:22 +02:00
parent b1062eb23e
commit 497f76bfbf
2 changed files with 6 additions and 0 deletions

View File

@@ -2417,11 +2417,14 @@ generate_ppconst(cctx_T *cctx, ppconst_T *ppconst)
{
int i;
int ret = OK;
int save_skip = cctx->ctx_skip;
cctx->ctx_skip = FALSE;
for (i = 0; i < ppconst->pp_used; ++i)
if (generate_tv_PUSH(cctx, &ppconst->pp_tv[i]) == FAIL)
ret = FAIL;
ppconst->pp_used = 0;
cctx->ctx_skip = save_skip;
return ret;
}
@@ -2754,6 +2757,7 @@ compile_call(
++ppconst->pp_used;
return OK;
}
clear_tv(&argvars[0]);
}
if (generate_ppconst(cctx, ppconst) == FAIL)