forked from aniani/vim
patch 8.2.1800: Vim9: memory leak if "if" condition is invalid
Problem: Vim9: memory leak if "if" condition is invalid. Solution: Free ppconst earlier.
This commit is contained in:
parent
d1ad99b654
commit
dda749ce85
@ -750,6 +750,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
1800,
|
||||||
/**/
|
/**/
|
||||||
1799,
|
1799,
|
||||||
/**/
|
/**/
|
||||||
|
@ -5721,10 +5721,10 @@ compile_if(char_u *arg, cctx_T *cctx)
|
|||||||
|
|
||||||
// The expression results in a constant.
|
// The expression results in a constant.
|
||||||
v = tv_get_bool_chk(&ppconst.pp_tv[0], &error);
|
v = tv_get_bool_chk(&ppconst.pp_tv[0], &error);
|
||||||
|
clear_ppconst(&ppconst);
|
||||||
if (error)
|
if (error)
|
||||||
return NULL;
|
return NULL;
|
||||||
cctx->ctx_skip = v ? SKIP_NOT : SKIP_YES;
|
cctx->ctx_skip = v ? SKIP_NOT : SKIP_YES;
|
||||||
clear_ppconst(&ppconst);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user