From 331891d3a2ed706bc0d9fb095f6f90db91e0ed20 Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Fri, 25 Apr 2014 21:47:52 -0400 Subject: you can't just free uv handles, you have to close them first this fixes some memory corruption --- src/window-xlib.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/window-xlib.c') diff --git a/src/window-xlib.c b/src/window-xlib.c index 85864e3..9b97c43 100644 --- a/src/window-xlib.c +++ b/src/window-xlib.c @@ -85,6 +85,7 @@ static void runes_window_backend_resize_window( static void runes_window_backend_flush(RunesTerm *t); static void runes_window_backend_visual_bell(RunesTerm *t); static void runes_window_backend_reset_visual_bell(uv_timer_t *handle); +static void runes_window_backend_visual_bell_free_handle(uv_handle_t *handle); static void runes_window_backend_audible_bell(RunesTerm *t); static void runes_window_backend_draw_cursor(RunesTerm *t); static void runes_window_backend_set_urgent(RunesTerm *t); @@ -505,6 +506,12 @@ static void runes_window_backend_reset_visual_bell(uv_timer_t *handle) runes_window_backend_request_flush(t); t->visual_bell_is_ringing = 0; + uv_close( + (uv_handle_t *)handle, runes_window_backend_visual_bell_free_handle); +} + +static void runes_window_backend_visual_bell_free_handle(uv_handle_t *handle) +{ free(handle); } -- cgit v1.2.3-54-g00ecf