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:
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user