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.
diff --git a/src/userfunc.c b/src/userfunc.c
index b87cded..c894c58 100644
--- a/src/userfunc.c
+++ b/src/userfunc.c
@@ -1146,7 +1146,8 @@
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;
}
diff --git a/src/version.c b/src/version.c
index e091971..4d81105 100644
--- a/src/version.c
+++ b/src/version.c
@@ -750,6 +750,8 @@
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 3927,
+/**/
3926,
/**/
3925,