if(sigalrm) {
logger(LOG_INFO, _("Flushing event queue"));
-
- while(event_tree->head) {
- event = event_tree->head->data;
- event->handler(event->data);
- event_del(event);
- }
+ flush_events();
sigalrm = false;
}
if(c->outgoing) {
free(c->outgoing->name);
- freeaddrinfo(c->outgoing->ai);
+ if(c->outgoing->ai)
+ freeaddrinfo(c->outgoing->ai);
free(c->outgoing);
c->outgoing = NULL;
}