vim-patch:8.1.1012: memory leak with E461

Problem:    Memory leak with E461.
Solution:   Clear the typeval. (Dominique Pelle, closes vim/vim#4111)
ab89d7ab89
This commit is contained in:
Jan Edmund Lazo 2019-07-03 02:53:57 -04:00
parent df6354c223
commit 9108256ad4

View File

@ -2369,6 +2369,7 @@ static char_u *get_lval(char_u *const name, typval_T *const rettv,
/* Can't add "v:" variable. */ /* Can't add "v:" variable. */
if (lp->ll_dict == &vimvardict) { if (lp->ll_dict == &vimvardict) {
EMSG2(_(e_illvar), name); EMSG2(_(e_illvar), name);
tv_clear(&var1);
return NULL; return NULL;
} }