From: Guus Sliepen Date: Tue, 10 Jun 2014 12:06:08 +0000 (+0200) Subject: Fix crash when calling meshlink_close(). X-Git-Url: https://git.meshlink.io/?a=commitdiff_plain;h=0b06e83440ca53357b154e0ce3094f6b67f93fa3;p=meshlink Fix crash when calling meshlink_close(). In event_loop_exit(), we should only unlink nodes, not try to free them, since we don't do allocation in event.h anymore. --- diff --git a/src/event.c b/src/event.c index 63657a5f..aa451801 100644 --- a/src/event.c +++ b/src/event.c @@ -246,9 +246,9 @@ void event_loop_init(event_loop_t *loop) { void event_loop_exit(event_loop_t *loop) { for splay_each(io_t, io, &loop->ios) - splay_free_node(&loop->ios, node); + splay_unlink_node(&loop->ios, node); for splay_each(timeout_t, timeout, &loop->timeouts) - splay_free_node(&loop->timeouts, node); + splay_unlink_node(&loop->timeouts, node); for splay_each(signal_t, signal, &loop->signals) - splay_free_node(&loop->signals, node); + splay_unlink_node(&loop->signals, node); }