Patch 8.0.0344
Problem: Unlet command leaks memory. (Nikolai Pavlov)
Solution: Free the memory on error. (closes #1497)
Files: src/eval.c, src/testdir/test_unlet.vim
*** ../vim-8.0.0343/src/eval.c 2017-02-20 22:35:29.013423395 +0100
--- src/eval.c 2017-02-20 23:01:52.241052040 +0100
***************
*** 2079,2085 ****
--- 2079,2088 ----
}
/* existing variable, need to check if it can be changed */
else if (var_check_ro(lp->ll_di->di_flags, name, FALSE))
+ {
+ clear_tv(&var1);
return NULL;
+ }
if (len == -1)
clear_tv(&var1);
*** ../vim-8.0.0343/src/testdir/test_unlet.vim 2016-01-15 18:39:37.000000000
+0100
--- src/testdir/test_unlet.vim 2017-02-20 22:52:35.737385559 +0100
***************
*** 17,19 ****
--- 17,23 ----
unlet! does_not_exist
call assert_fails('unlet does_not_exist', 'E108:')
endfunc
+
+ func Test_unlet_fails()
+ call assert_fails('unlet v:["count"]', 'E46:')
+ endfunc
*** ../vim-8.0.0343/src/version.c 2017-02-20 22:35:29.017423364 +0100
--- src/version.c 2017-02-20 23:02:56.028555995 +0100
***************
*** 766,767 ****
--- 766,769 ----
{ /* Add new patch number below this line */
+ /**/
+ 344,
/**/
--
Imagine a world without hypothetical situations.
/// 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].
For more options, visit https://groups.google.com/d/optout.