changeset 21038:6ad5f0c99ee9 v8.2.1070

patch 8.2.1070: Vim9: leaking memory when lacking white space in dict Commit: https://github.com/vim/vim/commit/ab19d495fd880b25a38d58cbeb5b21e4d0ee5835 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Jun 27 17:04:05 2020 +0200 patch 8.2.1070: Vim9: leaking memory when lacking white space in dict Problem: Vim9: leaking memory when lacking white space in dict. Solution: Clear the typval.
author Bram Moolenaar <Bram@vim.org>
date Sat, 27 Jun 2020 17:15:03 +0200
parents 0484ff664beb
children 4754f242bd14
files src/dict.c src/version.c
diffstat 2 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/dict.c
+++ b/src/dict.c
@@ -862,6 +862,7 @@ eval_dict(char_u **arg, typval_T *rettv,
 	if (vim9script && (*arg)[1] != NUL && !VIM_ISWHITE((*arg)[1]))
 	{
 	    semsg(_(e_white_after), ":");
+	    clear_tv(&tvkey);
 	    goto failret;
 	}
 
--- a/src/version.c
+++ b/src/version.c
@@ -755,6 +755,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    1070,
+/**/
     1069,
 /**/
     1068,