Patch 8.2.2279

6 views
Skip to first unread message

Bram Moolenaar

unread,
Jan 2, 2021, 12:18:06 PM1/2/21
to vim...@googlegroups.com

Patch 8.2.2279
Problem: Vim9: memory leak with catch in skipped block.
Solution: Free the pattern if not used.
Files: src/vim9compile.c


*** ../vim-8.2.2278/src/vim9compile.c 2021-01-02 15:41:00.193079024 +0100
--- src/vim9compile.c 2021-01-02 18:14:45.538731873 +0100
***************
*** 1009,1015 ****
{
isn_T *isn;

! RETURN_OK_IF_SKIP(cctx);
if ((isn = generate_instr_type(cctx, ISN_PUSHS, &t_string)) == NULL)
return FAIL;
isn->isn_arg.string = str;
--- 1009,1019 ----
{
isn_T *isn;

! if (cctx->ctx_skip == SKIP_YES)
! {
! vim_free(str);
! return OK;
! }
if ((isn = generate_instr_type(cctx, ISN_PUSHS, &t_string)) == NULL)
return FAIL;
isn->isn_arg.string = str;
*** ../vim-8.2.2278/src/version.c 2021-01-02 17:43:44.025175817 +0100
--- src/version.c 2021-01-02 18:16:54.078291495 +0100
***************
*** 752,753 ****
--- 752,755 ----
{ /* Add new patch number below this line */
+ /**/
+ 2279,
/**/

--
In order for something to become clean, something else must become dirty;
but you can get everything dirty without getting anything clean.

/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
Reply all
Reply to author
Forward
0 new messages