summaryrefslogtreecommitdiff
path: root/src/eval.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2016-06-01 22:21:06 +0200
committerBram Moolenaar <Bram@vim.org>2016-06-01 22:21:06 +0200
commita96732150cda2f242133228579b05437a39b8daa (patch)
treed47ae09c2dfccdb4331471cecbc3b35b43aab0a4 /src/eval.c
parent9ad73239c26467832a5b553b2a4b99d7ffbaa25e (diff)
downloadvim-git-a96732150cda2f242133228579b05437a39b8daa.tar.gz
patch 7.4.1866v7.4.1866
Problem: Invalid memory access when exiting with EXITFREE defined. (Dominique Pelle) Solution: Set "really_exiting" and skip error messages.
Diffstat (limited to 'src/eval.c')
-rw-r--r--src/eval.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/eval.c b/src/eval.c
index 3d0abf369..a49d54bd0 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -25348,7 +25348,11 @@ func_unref(char_u *name)
{
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