summaryrefslogtreecommitdiffstats
path: root/src/eval.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2019-06-06 18:05:25 +0200
committerBram Moolenaar <Bram@vim.org>2019-06-06 18:05:25 +0200
commit75ee544f99ca66be8105570c6309d95435ad30d1 (patch)
tree63caa3b09137b92ecf4bd6ffcc87a9f98dc4e38c /src/eval.c
parent5d30ff19648d2ff0696cea97582b902f6a4ec0ba (diff)
patch 8.1.1484: some tests are slowv8.1.1484
Problem: Some tests are slow. Solution: Add timing to the test messages. Fix double free when quitting in VimLeavePre autocmd.
Diffstat (limited to 'src/eval.c')
-rw-r--r--src/eval.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/eval.c b/src/eval.c
index af7a4af8a6..5452f45437 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -430,11 +430,12 @@ eval_clear(void)
vim_free(SCRIPT_SV(i));
ga_clear(&ga_scripts);
- /* unreferenced lists and dicts */
- (void)garbage_collect(FALSE);
-
- /* functions */
+ // functions need to be freed before gargabe collecting, otherwise local
+ // variables might be freed twice.
free_all_functions();
+
+ // unreferenced lists and dicts
+ (void)garbage_collect(FALSE);
}
#endif