mirror of
https://github.com/vim/vim.git
synced 2025-09-24 03:44:06 -04:00
patch 8.2.3443: Vim9: memory leak when and/or fails
Problem: Vim9: memory leak when and/or fails. Solution: Also clear the growarray when the length is zero.
This commit is contained in:
@@ -755,6 +755,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 */
|
||||||
|
/**/
|
||||||
|
3443,
|
||||||
/**/
|
/**/
|
||||||
3442,
|
3442,
|
||||||
/**/
|
/**/
|
||||||
|
@@ -5268,6 +5268,7 @@ compile_and_or(
|
|||||||
{
|
{
|
||||||
semsg(_(e_white_space_required_before_and_after_str_at_str),
|
semsg(_(e_white_space_required_before_and_after_str_at_str),
|
||||||
op, p);
|
op, p);
|
||||||
|
ga_clear(&end_ga);
|
||||||
return FAIL;
|
return FAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -5388,8 +5389,8 @@ compile_and_or(
|
|||||||
+ *(((int *)end_ga.ga_data) + end_ga.ga_len);
|
+ *(((int *)end_ga.ga_data) + end_ga.ga_len);
|
||||||
isn->isn_arg.jump.jump_where = instr->ga_len;
|
isn->isn_arg.jump.jump_where = instr->ga_len;
|
||||||
}
|
}
|
||||||
ga_clear(&end_ga);
|
|
||||||
}
|
}
|
||||||
|
ga_clear(&end_ga);
|
||||||
|
|
||||||
cctx->ctx_skip = save_skip;
|
cctx->ctx_skip = save_skip;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user