]> git.meshlink.io Git - meshlink/commitdiff
Fix crash when calling meshlink_close().
authorGuus Sliepen <guus@meshlink.io>
Tue, 10 Jun 2014 12:06:08 +0000 (14:06 +0200)
committerGuus Sliepen <guus@meshlink.io>
Tue, 10 Jun 2014 12:06:08 +0000 (14:06 +0200)
In event_loop_exit(), we should only unlink nodes, not try to free them,
since we don't do allocation in event.h anymore.

src/event.c

index 63657a5fde4d9505079eb34e24c2bf2ee57eb393..aa451801ea64742b5494785a1f378cee989a73e6 100644 (file)
@@ -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);
 }