X-Git-Url: https://www.tinc-vpn.org/git/browse?p=tinc;a=blobdiff_plain;f=src%2Fnet.c;h=f6b14704607477544b6a34f54cf2144096fe2548;hp=e834f923593c7e1e6e0c3e4ffb2aceb493f64b8d;hb=ab6f76f6a9fc8028fff96322a52b770710ffa1a9;hpb=0714ac6c59099a398e67770ad9c72fcec615812b diff --git a/src/net.c b/src/net.c index e834f923..f6b14704 100644 --- a/src/net.c +++ b/src/net.c @@ -429,12 +429,7 @@ int main_loop(void) 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; } @@ -463,7 +458,8 @@ int main_loop(void) 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; }