From acb7c826b3df50bd9825baf3b2ffaaa79c8b80df Mon Sep 17 00:00:00 2001 From: Björn Linse Date: Sat, 16 Jul 2016 16:51:56 +0200 Subject: api: fix leak when a api function is incorrectly called with a list. This applies both to msgpack-rpc and eval. --- src/nvim/eval.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/nvim/eval.c') diff --git a/src/nvim/eval.c b/src/nvim/eval.c index ac34ad4923..bfe4707dab 100644 --- a/src/nvim/eval.c +++ b/src/nvim/eval.c @@ -7140,8 +7140,7 @@ static void api_wrapper(typval_T *argvars, typval_T *rettv, FunPtr fptr) } end: - // All arguments were freed already, but we still need to free the array - xfree(args.items); + api_free_array(args); api_free_object(result); } -- cgit