To: vim_dev@googlegroups.com Subject: Patch 8.2.2279 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ 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 -- Bram@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 ///