Mercurial > dovecot > original-hg > dovecot-1.2
changeset 3987:9099825aac9a HEAD
Don't crash if we couldn't add I/O notifier.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Sun, 05 Feb 2006 15:33:23 +0200 |
parents | dd389a881380 |
children | ab1a0a377851 |
files | src/lib/ioloop.c |
diffstat | 1 files changed, 3 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lib/ioloop.c Sun Feb 05 15:07:16 2006 +0200 +++ b/src/lib/ioloop.c Sun Feb 05 15:33:23 2006 +0200 @@ -50,9 +50,10 @@ i_assert(callback != NULL); io = io_loop_notify_add(current_ioloop, path, callback, context); - if (io != NULL) - io->condition |= IO_NOTIFY; + if (io == NULL) + return NULL; + io->condition |= IO_NOTIFY; io->next = current_ioloop->notifys; current_ioloop->notifys = io;