To: vim_dev@googlegroups.com Subject: Patch 8.2.0974 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.2.0974 Problem: Vim9: memory leak when script var has wrong type. Solution: Free the variable name. Files: src/vim9script.vim *** ../vim-8.2.0973/src/vim9script.c 2020-06-13 19:00:06.887160162 +0200 --- src/vim9script.c 2020-06-13 19:54:45.424893413 +0200 *************** *** 477,483 **** --- 477,486 ---- p = skipwhite(p + 1); type = parse_type(&p, &si->sn_type_list); if (called_emsg != called_emsg_before) + { + vim_free(name); return p; + } // Create the variable with 0/NULL value. CLEAR_FIELD(init_tv); *** ../vim-8.2.0973/src/version.c 2020-06-13 19:00:06.887160162 +0200 --- src/version.c 2020-06-13 19:56:08.476530934 +0200 *************** *** 756,757 **** --- 756,759 ---- { /* Add new patch number below this line */ + /**/ + 974, /**/ -- Vim is like Emacs without all the typing. (John "Johann" Spetz) /// 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 ///