patch 7.4.1866
Problem: Invalid memory access when exiting with EXITFREE defined.
(Dominique Pelle)
Solution: Set "really_exiting" and skip error messages.
diff --git a/src/eval.c b/src/eval.c
index 3d0abf3..a49d54b 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -25348,7 +25348,11 @@
{
fp = find_func(name);
if (fp == NULL)
- EMSG2(_(e_intern2), "func_unref()");
+ {
+ /* Ignore when invoked through free_all_mem(). */
+ if (!really_exiting)
+ EMSG2(_(e_intern2), "func_unref()");
+ }
else if (--fp->uf_refcount <= 0)
{
/* Only delete it when it's not being used. Otherwise it's done