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 -- [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/202006131757.05DHvPUY651549%40masaka.moolenaar.net.