patch 8.2.1161: Vim9: using freed memory
Problem: Vim9: using freed memory.
Solution: Put pointer back in evalarg instead of freeing it.
diff --git a/src/structs.h b/src/structs.h
index 4ae94fd..bdc763b 100644
--- a/src/structs.h
+++ b/src/structs.h
@@ -1773,8 +1773,11 @@
// "eval_ga.ga_data" is a list of pointers to lines.
garray_T eval_ga;
- // pointer to the line obtained with getsourceline()
+ // pointer to the last line obtained with getsourceline()
char_u *eval_tofree;
+
+ // pointer to the lines concatenated for a lambda.
+ char_u *eval_tofree_lambda;
} evalarg_T;
// Flags for expression evaluation.