mirror of
https://github.com/vim/vim.git
synced 2025-07-26 11:04:33 -04:00
patch 8.2.2023: Vim: memory leak when :execute fails
Problem: Vim: memory leak when :execute fails. Solution: Clear the growarray.
This commit is contained in:
parent
95388e3179
commit
c71ee829ef
@ -750,6 +750,8 @@ static char *(features[]) =
|
||||
|
||||
static int included_patches[] =
|
||||
{ /* Add new patch number below this line */
|
||||
/**/
|
||||
2023,
|
||||
/**/
|
||||
2022,
|
||||
/**/
|
||||
|
@ -1200,7 +1200,10 @@ call_def_function(
|
||||
}
|
||||
ectx.ec_stack.ga_len -= count;
|
||||
if (failed)
|
||||
{
|
||||
ga_clear(&ga);
|
||||
goto on_error;
|
||||
}
|
||||
|
||||
if (ga.ga_data != NULL)
|
||||
{
|
||||
@ -1209,8 +1212,11 @@ call_def_function(
|
||||
SOURCING_LNUM = iptr->isn_lnum;
|
||||
do_cmdline_cmd((char_u *)ga.ga_data);
|
||||
if (did_emsg)
|
||||
{
|
||||
ga_clear(&ga);
|
||||
goto on_error;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
msg_sb_eol();
|
||||
|
Loading…
x
Reference in New Issue
Block a user