diff --git a/src/nvim/ui_compositor.c b/src/nvim/ui_compositor.c index b8c7834e2b..2fb70eae8a 100644 --- a/src/nvim/ui_compositor.c +++ b/src/nvim/ui_compositor.c @@ -98,7 +98,7 @@ void ui_comp_free_all_mem(void) { UIEventCallback *event_cb; map_foreach_value(&ui_event_cbs, event_cb, { - xfree(event_cb); + free_ui_event_callback(event_cb); }) pmap_destroy(uint32_t)(&ui_event_cbs); }