aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/eval.c
diff options
context:
space:
mode:
authorJames McCoy <jamessan@jamessan.com>2017-01-01 22:34:17 -0500
committerJames McCoy <jamessan@jamessan.com>2017-01-01 23:20:24 -0500
commit1feaa450cb024a4cd4eb3ae7ab7e5db683909488 (patch)
treeb4a2ba8ffb8450f9227a0d9ce0bd2989bb075e3a /src/nvim/eval.c
parentc5f4b92ff93a40ec4e77b78d0576903e7a60eefd (diff)
downloadrneovim-1feaa450cb024a4cd4eb3ae7ab7e5db683909488.tar.gz
rneovim-1feaa450cb024a4cd4eb3ae7ab7e5db683909488.tar.bz2
rneovim-1feaa450cb024a4cd4eb3ae7ab7e5db683909488.zip
vim-patch:7.4.1866
Problem: Invalid memory access when exiting with EXITFREE defined. (Dominique Pelle) Solution: Set "really_exiting" and skip error messages. https://github.com/vim/vim/commit/a96732150cda2f242133228579b05437a39b8daa This fails to build, due to a00c2e0ecbaec366364cecb5efbdb456c8c543ef removing really_exiting from globals.h, but the next commit fixes the build failure.
Diffstat (limited to 'src/nvim/eval.c')
-rw-r--r--src/nvim/eval.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/nvim/eval.c b/src/nvim/eval.c
index 32e1991742..c900cf5dfb 100644
--- a/src/nvim/eval.c
+++ b/src/nvim/eval.c
@@ -21569,7 +21569,10 @@ void func_unref(char_u *name)
if (name != NULL && isdigit(*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 {
user_func_unref(fp);
}