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/msgpack_rpc/channel.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/nvim/msgpack_rpc/channel.c') diff --git a/src/nvim/msgpack_rpc/channel.c b/src/nvim/msgpack_rpc/channel.c index 8b5f212d66..cd12f258b6 100644 --- a/src/nvim/msgpack_rpc/channel.c +++ b/src/nvim/msgpack_rpc/channel.c @@ -465,8 +465,7 @@ static void on_request_event(void **argv) } else { api_free_object(result); } - // All arguments were freed already, but we still need to free the array - xfree(args.items); + api_free_array(args); decref(channel); xfree(e); } -- cgit