mirror of
https://github.com/vim/vim.git
synced 2025-09-07 22:03:36 -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:
parent
92f246e4f9
commit
8c697e3698
@ -1146,7 +1146,8 @@ lambda_function_body(
|
||||
ga_init2(&newlines, (int)sizeof(char_u *), 10);
|
||||
if (get_function_body(&eap, &newlines, NULL, &line_to_free) == FAIL)
|
||||
{
|
||||
vim_free(cmdline);
|
||||
if (cmdline != line_to_free)
|
||||
vim_free(cmdline);
|
||||
goto erret;
|
||||
}
|
||||
|
||||
|
@ -749,6 +749,8 @@ static char *(features[]) =
|
||||
|
||||
static int included_patches[] =
|
||||
{ /* Add new patch number below this line */
|
||||
/**/
|
||||
3927,
|
||||
/**/
|
||||
3926,
|
||||
/**/
|
||||
|
Loading…
x
Reference in New Issue
Block a user