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.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/nvim/eval.c b/src/nvim/eval.c
index ac4713b983..f9e24e094d 100644
--- a/src/nvim/eval.c
+++ b/src/nvim/eval.c
@@ -442,7 +442,8 @@ void eval_clear(void)
// 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();
}