From: Guus Sliepen Date: Sun, 17 Apr 2016 14:23:31 +0000 (+0200) Subject: Don't call terminate_connection(myself->connection). X-Git-Tag: release-1.1pre12~9 X-Git-Url: https://tinc-vpn.org/git/browse?a=commitdiff_plain;h=f934417aa658367587dadc81bd5c466baef407ef;p=tinc Don't call terminate_connection(myself->connection). It doesn't do anything except give a confusing error message that we are closing the connection to ourself. Replace it with connection_del(). This also fixes a double free. --- diff --git a/src/net_setup.c b/src/net_setup.c index cbd3954c..30e6f848 100644 --- a/src/net_setup.c +++ b/src/net_setup.c @@ -1154,8 +1154,7 @@ void close_network_connections(void) { if(myself && myself->connection) { subnet_update(myself, NULL, false); - terminate_connection(myself->connection, false); - free_connection(myself->connection); + connection_del(myself->connection); } for(int i = 0; i < listen_sockets; i++) {