Patch 8.2.0974

8 views
Skip to first unread message

Bram Moolenaar

unread,
Jun 13, 2020, 1:57:35 PM6/13/20
to vim...@googlegroups.com

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 -- 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