0
0
mirror of https://github.com/vim/vim.git synced 2025-09-25 03:54:15 -04:00

patch 8.2.1860: Vim9: memory leak when throwing empty string

Problem:    Vim9: memory leak when throwing empty string.
Solution:   Free the empty string.
This commit is contained in:
Bram Moolenaar
2020-10-17 22:58:21 +02:00
parent 352134bbfb
commit 335e671322
2 changed files with 3 additions and 0 deletions

View File

@@ -2094,6 +2094,7 @@ call_def_function(
if (tv->vval.v_string == NULL
|| *skipwhite(tv->vval.v_string) == NUL)
{
vim_free(tv->vval.v_string);
emsg(_(e_throw_with_empty_string));
goto failed;
}