changeset 4582:8e1c05006f2d HEAD

io_add_notify() didn't set refcount so io_remove() crashed for it.
author Timo Sirainen <tss@iki.fi>
date Fri, 18 Aug 2006 00:16:49 +0300
parents c25c0ae8f1f0
children 30416fa0bdeb
files src/lib/ioloop.c
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/lib/ioloop.c	Thu Aug 17 22:48:25 2006 +0300
+++ b/src/lib/ioloop.c	Fri Aug 18 00:16:49 2006 +0300
@@ -53,6 +53,7 @@
 	if (io == NULL)
 		return NULL;
 
+	io->refcount = 1;
 	io->condition |= IO_NOTIFY;
 	io->next = current_ioloop->notifys;
 	current_ioloop->notifys = io;