diff options
Diffstat (limited to 'src/nvim/eval.c')
-rw-r--r-- | src/nvim/eval.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/src/nvim/eval.c b/src/nvim/eval.c index c683fe4e10..15b712e7de 100644 --- a/src/nvim/eval.c +++ b/src/nvim/eval.c @@ -20712,13 +20712,7 @@ void func_unref(char_u *name) abort(); #endif } - if (fp != NULL && --fp->uf_refcount <= 0) { - // Only delete it when it's not being used. Otherwise it's done - // when "uf_calls" becomes zero. - if (fp->uf_calls == 0) { - func_clear_free(fp, false); - } - } + func_ptr_unref(fp); } /// Unreference a Function: decrement the reference count and free it when it |