0
0
mirror of https://github.com/vim/vim.git synced 2025-07-26 11:04:33 -04:00

patch 8.2.0768: Vim9: memory leak in script test

Problem:    Vim9: memory leak in script test.
Solution:   Clear typval before giving an error message.
This commit is contained in:
Bram Moolenaar 2020-05-16 15:43:31 +02:00
parent 645e3fe3fe
commit e75ba268b3
2 changed files with 3 additions and 1 deletions

View File

@ -746,6 +746,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
768,
/**/
767,
/**/

View File

@ -1169,12 +1169,12 @@ call_def_function(
n = tv->vval.v_number;
msg = set_option_value(iptr->isn_arg.storeopt.so_name,
n, s, iptr->isn_arg.storeopt.so_flags);
clear_tv(tv);
if (msg != NULL)
{
emsg(_(msg));
goto failed;
}
clear_tv(tv);
}
break;