X-Git-Url: https://tinc-vpn.org/git/browse?a=blobdiff_plain;f=src%2Fnet_setup.c;h=4e1f2b81fcfda99998be76b0d288df4dc080d24c;hb=0871c3095151bce6a4031a2662aa51b7193b855c;hp=c2e0825ed87bc0779fe957d3b0103609b8ce7cd6;hpb=9e917cc3b614d7a986416e6a2c3ea9ea583adacf;p=tinc diff --git a/src/net_setup.c b/src/net_setup.c index c2e0825e..4e1f2b81 100644 --- a/src/net_setup.c +++ b/src/net_setup.c @@ -1149,7 +1149,7 @@ bool setup_network(void) { close all open network connections */ void close_network_connections(void) { - for(list_node_t *node = connection_list->head, *next; node; node = next) { + for(list_node_t *node = connection_list.head, *next; node; node = next) { next = node->next; connection_t *c = node->data; @@ -1162,9 +1162,7 @@ void close_network_connections(void) { terminate_connection(c, false); } - if(outgoing_list) { - list_delete_list(outgoing_list); - } + list_empty_list(&outgoing_list); if(myself && myself->connection) { subnet_update(myself, NULL, false);