aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/nvim/eval.c3
-rw-r--r--src/nvim/msgpack_rpc/channel.c3
2 files changed, 2 insertions, 4 deletions
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);
}
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);
}