Mercurial > vim
changeset 9165:062eb6d28b0c v7.4.1866
commit https://github.com/vim/vim/commit/a96732150cda2f242133228579b05437a39b8daa
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Jun 1 22:21:06 2016 +0200
patch 7.4.1866
Problem: Invalid memory access when exiting with EXITFREE defined.
(Dominique Pelle)
Solution: Set "really_exiting" and skip error messages.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Wed, 01 Jun 2016 22:30:07 +0200 |
parents | fe7386df8418 |
children | f26bd55ed226 |
files | src/eval.c src/misc2.c src/version.c |
diffstat | 3 files changed, 10 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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