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 -- [email protected] -- 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 ///
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/vim_dev/202101021717.102HHt3N1902341%40masaka.moolenaar.net.