Patch 8.2.3443
Problem: Vim9: memory leak when and/or fails.
Solution: Also clear the growarray when the length is zero.
Files: src/vim9compile.c
*** ../vim-8.2.3442/src/vim9compile.c 2021-09-16 16:15:00.204224417 +0200
--- src/vim9compile.c 2021-09-16 20:11:31.971341070 +0200
***************
*** 5268,5273 ****
--- 5268,5274 ----
{
semsg(_(e_white_space_required_before_and_after_str_at_str),
op, p);
+ ga_clear(&end_ga);
return FAIL;
}
***************
*** 5388,5395 ****
+ *(((int *)end_ga.ga_data) + end_ga.ga_len);
isn->isn_arg.jump.jump_where = instr->ga_len;
}
- ga_clear(&end_ga);
}
cctx->ctx_skip = save_skip;
}
--- 5389,5396 ----
+ *(((int *)end_ga.ga_data) + end_ga.ga_len);
isn->isn_arg.jump.jump_where = instr->ga_len;
}
}
+ ga_clear(&end_ga);
cctx->ctx_skip = save_skip;
}
*** ../vim-8.2.3442/src/version.c 2021-09-16 16:15:00.204224417 +0200
--- src/version.c 2021-09-16 20:14:25.071067830 +0200
***************
*** 757,758 ****
--- 757,760 ----
{ /* Add new patch number below this line */
+ /**/
+ 3443,
/**/
--
The only backup you need is the one that you didn't have time for.
(Murphy)
/// Bram Moolenaar -- Br...@Moolenaar.net --
http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features --
http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims --
http://ICCF-Holland.org ///