mirror of
https://github.com/vim/vim.git
synced 2025-10-28 09:27:14 -04:00
patch 8.2.2101: Vim9: memory leak when literal dict has an error
Problem: Vim9: memory leak when literal dict has an error and when an
expression is not complete.
Solution: Clear the typval and the growarray.
This commit is contained in:
@@ -929,6 +929,7 @@ eval_dict(char_u **arg, typval_T *rettv, evalarg_T *evalarg, int literal)
|
||||
if (**arg != ']')
|
||||
{
|
||||
emsg(_(e_missing_matching_bracket_after_dict_key));
|
||||
clear_tv(&tvkey);
|
||||
return FAIL;
|
||||
}
|
||||
++*arg;
|
||||
|
||||
Reference in New Issue
Block a user