patch 8.2.3923: Vim9: double free with split argument list in nested function
Problem: Vim9: double free if a nested function has a line break in the
argument list.
Solution: Set cmdlinep when freeing the previous line.
diff --git a/src/userfunc.c b/src/userfunc.c
index e1028e7..a7cbac3 100644
--- a/src/userfunc.c
+++ b/src/userfunc.c
@@ -219,6 +219,8 @@
if (theline == NULL)
break;
vim_free(*line_to_free);
+ if (*eap->cmdlinep == *line_to_free)
+ *eap->cmdlinep = theline;
*line_to_free = theline;
whitep = (char_u *)" ";
p = skipwhite(theline);