mirror of
https://github.com/vim/vim.git
synced 2025-09-24 03:44:06 -04:00
patch 8.2.3927: Vim9: double free when using lambda
Problem: Vim9: double free when using lambda. Solution: Don't free both cmdline and line_to_free.
This commit is contained in:
@@ -1146,6 +1146,7 @@ lambda_function_body(
|
|||||||
ga_init2(&newlines, (int)sizeof(char_u *), 10);
|
ga_init2(&newlines, (int)sizeof(char_u *), 10);
|
||||||
if (get_function_body(&eap, &newlines, NULL, &line_to_free) == FAIL)
|
if (get_function_body(&eap, &newlines, NULL, &line_to_free) == FAIL)
|
||||||
{
|
{
|
||||||
|
if (cmdline != line_to_free)
|
||||||
vim_free(cmdline);
|
vim_free(cmdline);
|
||||||
goto erret;
|
goto erret;
|
||||||
}
|
}
|
||||||
|
@@ -749,6 +749,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 */
|
||||||
|
/**/
|
||||||
|
3927,
|
||||||
/**/
|
/**/
|
||||||
3926,
|
3926,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user