summaryrefslogtreecommitdiffstats
path: root/src/eval.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2018-10-14 21:41:01 +0200
committerBram Moolenaar <Bram@vim.org>2018-10-14 21:41:01 +0200
commit27e80c885bcb5c5cf6a6462d71d6c81b06ba2451 (patch)
tree5f23ab7eeb2ddc833a739d7c0ac62c0dd3a2e863 /src/eval.c
parenta16bc5450359294f9d8585da9f74e5082108b7fb (diff)
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/eval.c')
-rw-r--r--src/eval.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/eval.c b/src/eval.c
index 8746d55563..7c462fb6a2 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -859,9 +859,9 @@ eval_to_string_safe(
int use_sandbox)
{
char_u *retval;
- void *save_funccalp;
+ funccal_entry_T funccal_entry;
- save_funccalp = save_funccal();
+ save_funccal(&funccal_entry);
if (use_sandbox)
++sandbox;
++textlock;
@@ -869,7 +869,7 @@ eval_to_string_safe(
if (use_sandbox)
--sandbox;
--textlock;
- restore_funccal(save_funccalp);
+ restore_funccal();
return retval;
}
@@ -8532,7 +8532,7 @@ read_viminfo_varlist(vir_T *virp, int writing)
char_u *tab;
int type = VAR_NUMBER;
typval_T tv;
- void *save_funccal;
+ funccal_entry_T funccal_entry;
if (!writing && (find_viminfo_parameter('!') != NULL))
{
@@ -8581,9 +8581,9 @@ read_viminfo_varlist(vir_T *virp, int writing)
}
/* when in a function use global variables */
- save_funccal = clear_current_funccal();
+ save_funccal(&funccal_entry);
set_var(virp->vir_line + 1, &tv, FALSE);
- restore_current_funccal(save_funccal);
+ restore_funccal();
if (tv.v_type == VAR_STRING)
vim_free(tv.vval.v_string);