aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/eval.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/eval.c')
-rw-r--r--src/nvim/eval.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/nvim/eval.c b/src/nvim/eval.c
index b31b6bd0f8..e24605f25f 100644
--- a/src/nvim/eval.c
+++ b/src/nvim/eval.c
@@ -439,12 +439,11 @@ void eval_clear(void)
xfree(SCRIPT_SV(i));
ga_clear(&ga_scripts);
- // 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);
+
+ // functions not garbage collected
+ free_all_functions();
}
#endif