mirror of
https://github.com/vim/vim.git
synced 2025-09-26 04:04:07 -04:00
patch 8.2.2087: Vim9: memory leak when statement is truncated
Problem: Vim9: memory leak when statement is truncated. Solution: Increment the number of local variables.
This commit is contained in:
@@ -750,6 +750,8 @@ static char *(features[]) =
|
||||
|
||||
static int included_patches[] =
|
||||
{ /* Add new patch number below this line */
|
||||
/**/
|
||||
2087,
|
||||
/**/
|
||||
2086,
|
||||
/**/
|
||||
|
@@ -5669,7 +5669,11 @@ compile_assignment(char_u *arg, exarg_T *eap, cmdidx_T cmdidx, cctx_T *cctx)
|
||||
wp = op + oplen;
|
||||
p = skipwhite(wp);
|
||||
if (may_get_next_line_error(wp, &p, cctx) == FAIL)
|
||||
{
|
||||
if (new_local)
|
||||
++cctx->ctx_locals.ga_len;
|
||||
goto theend;
|
||||
}
|
||||
r = compile_expr0_ext(&p, cctx, &is_const);
|
||||
if (new_local)
|
||||
++cctx->ctx_locals.ga_len;
|
||||
|
Reference in New Issue
Block a user