mirror of
https://github.com/vim/vim.git
synced 2025-09-23 03:43:49 -04:00
patch 8.2.2786: Vim9: memory leak when using :s with expression
Problem: Vim9: memory leak when using :s with expression. Solution: Clean up the instruction list.
This commit is contained in:
@@ -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 */
|
||||||
|
/**/
|
||||||
|
2786,
|
||||||
/**/
|
/**/
|
||||||
2785,
|
2785,
|
||||||
/**/
|
/**/
|
||||||
|
@@ -9416,8 +9416,15 @@ delete_instr(isn_T *isn)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case ISN_SUBSTITUTE:
|
case ISN_SUBSTITUTE:
|
||||||
vim_free(isn->isn_arg.subs.subs_cmd);
|
{
|
||||||
vim_free(isn->isn_arg.subs.subs_instr);
|
int idx;
|
||||||
|
isn_T *list = isn->isn_arg.subs.subs_instr;
|
||||||
|
|
||||||
|
vim_free(isn->isn_arg.subs.subs_cmd);
|
||||||
|
for (idx = 0; list[idx].isn_type != ISN_FINISH; ++idx)
|
||||||
|
delete_instr(list + idx);
|
||||||
|
vim_free(list);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ISN_LOADS:
|
case ISN_LOADS:
|
||||||
|
Reference in New Issue
Block a user