From 9cf59acfaa2a050ce7fbc68d5435bf777618dedb Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Mon, 17 Apr 2023 15:21:03 +0800 Subject: vim-patch:8.2.4182: memory leak when evaluating 'diffexpr' Problem: Memory leak when evaluating 'diffexpr'. Solution: Use free_tv() instead of clear_tv(). https://github.com/vim/vim/commit/39b8944539a9cde553fe709e535fdfd37d0f9307 Co-authored-by: Bram Moolenaar --- src/nvim/eval.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/nvim') diff --git a/src/nvim/eval.c b/src/nvim/eval.c index 5eb7e2260f..750d9df454 100644 --- a/src/nvim/eval.c +++ b/src/nvim/eval.c @@ -681,7 +681,7 @@ void eval_diff(const char *const origfile, const char *const newfile, const char // errors are ignored typval_T *tv = eval_expr(p_dex, NULL); - tv_clear(tv); + tv_free(tv); set_vim_var_string(VV_FNAME_IN, NULL, -1); set_vim_var_string(VV_FNAME_NEW, NULL, -1); -- cgit