X-Git-Url: http://git.pk910.de/?a=blobdiff_plain;f=src%2Ftimeq.c;h=7689b316f0fb35d2614c47d1b9ac212d31baa981;hb=9921b4a73a989eb4858499f4c61bb3367c1b0fe4;hp=335032519f52a837b01c9f5e58bce5cc88face4e;hpb=02e797baca7f15e306d70b3b7e2b4d83ff1cf44f;p=NeonServV5.git diff --git a/src/timeq.c b/src/timeq.c index 3350325..7689b31 100644 --- a/src/timeq.c +++ b/src/timeq.c @@ -29,6 +29,7 @@ static IOHANDLER_CALLBACK(timeq_callback) { switch(event->type) { case IOEVENT_TIMEOUT: entry->callback(entry->data); + entry->iofd = NULL; timeq_del(entry); break; default: @@ -92,7 +93,8 @@ int timeq_del(struct timeq_entry* entry) { timeq_events = entry->next; if(entry->name) free(entry->name); - iohandler_close(entry->iofd); + if(entry->iofd) + iohandler_close(entry->iofd); free(entry); DESYNCHRONIZE(synchronized); return 1;