mirror of
https://github.com/vim/vim.git
synced 2025-07-26 11:04:33 -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:
parent
352134bbfb
commit
335e671322
@ -750,6 +750,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
1860,
|
||||||
/**/
|
/**/
|
||||||
1859,
|
1859,
|
||||||
/**/
|
/**/
|
||||||
|
@ -2094,6 +2094,7 @@ call_def_function(
|
|||||||
if (tv->vval.v_string == NULL
|
if (tv->vval.v_string == NULL
|
||||||
|| *skipwhite(tv->vval.v_string) == NUL)
|
|| *skipwhite(tv->vval.v_string) == NUL)
|
||||||
{
|
{
|
||||||
|
vim_free(tv->vval.v_string);
|
||||||
emsg(_(e_throw_with_empty_string));
|
emsg(_(e_throw_with_empty_string));
|
||||||
goto failed;
|
goto failed;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user