X-Git-Url: https://www.tinc-vpn.org/git/browse?p=tinc;a=blobdiff_plain;f=src%2Fnet_setup.c;h=c413792abbe07def1b38bc7f8fac06f02edfe175;hp=f52afb046fc337b7ca9e17814bd0449b82659311;hb=503c32eb0ef9d6329e931559082f4ddf6d487dc6;hpb=a7e793c94ec414eb71ec2aa3debc9e2e5ed5cfef diff --git a/src/net_setup.c b/src/net_setup.c index f52afb04..c413792a 100644 --- a/src/net_setup.c +++ b/src/net_setup.c @@ -571,18 +571,12 @@ void close_network_connections(void) for(node = connection_tree->head; node; node = next) { next = node->next; c = node->data; - - if(c->outgoing) { - if(c->outgoing->ai) - freeaddrinfo(c->outgoing->ai); - free(c->outgoing->name); - free(c->outgoing); - c->outgoing = NULL; - } - + c->outgoing = false; terminate_connection(c, false); } + list_delete_list(outgoing_list); + if(myself && myself->connection) { subnet_update(myself, NULL, false); terminate_connection(myself->connection, false);