diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2017-08-18 14:13:28 +0200 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2017-08-21 01:04:28 +0200 |
commit | 0f442c328e33a0c742df9283c1944c077d202a77 (patch) | |
tree | c419bd6829db9e1f6917de5c93124896e1f9c917 /src/nvim/msgpack_rpc/helpers.c | |
parent | af993da4351d579aa24de08d806c8c1b90813106 (diff) | |
download | rneovim-0f442c328e33a0c742df9283c1944c077d202a77.tar.gz rneovim-0f442c328e33a0c742df9283c1944c077d202a77.tar.bz2 rneovim-0f442c328e33a0c742df9283c1944c077d202a77.zip |
channel.c:call_set_error(): fix memory leak
Diffstat (limited to 'src/nvim/msgpack_rpc/helpers.c')
-rw-r--r-- | src/nvim/msgpack_rpc/helpers.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/nvim/msgpack_rpc/helpers.c b/src/nvim/msgpack_rpc/helpers.c index 98e56dee3b..fecae11d45 100644 --- a/src/nvim/msgpack_rpc/helpers.c +++ b/src/nvim/msgpack_rpc/helpers.c @@ -88,7 +88,12 @@ bool msgpack_rpc_to_object(const msgpack_object *const obj, Object *const arg) { bool ret = true; kvec_t(MPToAPIObjectStackItem) stack = KV_INITIAL_VALUE; - kv_push(stack, ((MPToAPIObjectStackItem) { obj, arg, false, 0 })); + kv_push(stack, ((MPToAPIObjectStackItem) { + .mobj = obj, + .aobj = arg, + .container = false, + .idx = 0, + })); while (ret && kv_size(stack)) { MPToAPIObjectStackItem cur = kv_last(stack); if (!cur.container) { |