mirror of
https://github.com/vim/vim.git
synced 2025-09-23 03:43:49 -04:00
patch 8.2.0974: Vim9: memory leak when script var has wrong type
Problem: Vim9: memory leak when script var has wrong type. Solution: Free the variable name.
This commit is contained in:
@@ -754,6 +754,8 @@ static char *(features[]) =
|
||||
|
||||
static int included_patches[] =
|
||||
{ /* Add new patch number below this line */
|
||||
/**/
|
||||
974,
|
||||
/**/
|
||||
973,
|
||||
/**/
|
||||
|
@@ -477,7 +477,10 @@ vim9_declare_scriptvar(exarg_T *eap, char_u *arg)
|
||||
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);
|
||||
|
Reference in New Issue
Block a user