diff options
author | Bram Moolenaar <Bram@vim.org> | 2018-10-14 21:41:01 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2018-10-14 21:41:01 +0200 |
commit | 27e80c885bcb5c5cf6a6462d71d6c81b06ba2451 (patch) | |
tree | 5f23ab7eeb2ddc833a739d7c0ac62c0dd3a2e863 /src/ex_cmds2.c | |
parent | a16bc5450359294f9d8585da9f74e5082108b7fb (diff) | |
download | vim-git-27e80c885bcb5c5cf6a6462d71d6c81b06ba2451.tar.gz |
patch 8.1.0475: memory not freed on exit when quit in autocmdv8.1.0475
Problem: Memory not freed on exit when quit in autocmd.
Solution: Remember funccal stack when executing autocmd.
Diffstat (limited to 'src/ex_cmds2.c')
-rw-r--r-- | src/ex_cmds2.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/ex_cmds2.c b/src/ex_cmds2.c index 032ebe93b..9a23f8205 100644 --- a/src/ex_cmds2.c +++ b/src/ex_cmds2.c @@ -4344,7 +4344,7 @@ do_source( #ifdef FEAT_EVAL sctx_T save_current_sctx; static scid_T last_current_SID = 0; - void *save_funccalp; + funccal_entry_T funccalp_entry; int save_debug_break_level = debug_break_level; scriptitem_T *si = NULL; # ifdef UNIX @@ -4506,7 +4506,7 @@ do_source( /* Don't use local function variables, if called from a function. * Also starts profiling timer for nested script. */ - save_funccalp = save_funccal(); + save_funccal(&funccalp_entry); /* * Check if this script was sourced before to finds its SID. @@ -4665,7 +4665,7 @@ do_source( #ifdef FEAT_EVAL almosttheend: current_sctx = save_current_sctx; - restore_funccal(save_funccalp); + restore_funccal(); # ifdef FEAT_PROFILE if (do_profiling == PROF_YES) prof_child_exit(&wait_start); /* leaving a child now */ |