aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/msgpack_rpc/channel.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/msgpack_rpc/channel.c')
-rw-r--r--src/nvim/msgpack_rpc/channel.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/nvim/msgpack_rpc/channel.c b/src/nvim/msgpack_rpc/channel.c
index 34879e425e..fc0409e137 100644
--- a/src/nvim/msgpack_rpc/channel.c
+++ b/src/nvim/msgpack_rpc/channel.c
@@ -478,9 +478,9 @@ static void on_request_event(Event event)
result,
&out_buffer));
// All arguments were freed already, but we still need to free the array
- free(args.items);
+ xfree(args.items);
decref(channel);
- free(e);
+ xfree(e);
}
static bool channel_write(Channel *channel, WBuffer *buffer)
@@ -601,7 +601,7 @@ static void unsubscribe(Channel *channel, char *event)
// Since the string is no longer used by other channels, release it's memory
pmap_del(cstr_t)(event_strings, event_string);
- free(event_string);
+ xfree(event_string);
}
/// Close the channel streams/job and free the channel resources.
@@ -655,13 +655,13 @@ static void free_channel(Channel *channel)
pmap_free(cstr_t)(channel->subscribed_events);
kv_destroy(channel->call_stack);
kv_destroy(channel->delayed_notifications);
- free(channel);
+ xfree(channel);
}
static void close_cb(uv_handle_t *handle)
{
- free(handle->data);
- free(handle);
+ xfree(handle->data);
+ xfree(handle);
}
static Channel *register_channel(void)
@@ -738,7 +738,7 @@ static WBuffer *serialize_request(uint64_t channel_id,
WBuffer *rv = wstream_new_buffer(xmemdup(sbuffer->data, sbuffer->size),
sbuffer->size,
refcount,
- free);
+ xfree);
msgpack_sbuffer_clear(sbuffer);
api_free_array(args);
return rv;
@@ -757,7 +757,7 @@ static WBuffer *serialize_response(uint64_t channel_id,
WBuffer *rv = wstream_new_buffer(xmemdup(sbuffer->data, sbuffer->size),
sbuffer->size,
1, // responses only go though 1 channel
- free);
+ xfree);
msgpack_sbuffer_clear(sbuffer);
api_free_object(arg);
return rv;