From f934417aa658367587dadc81bd5c466baef407ef Mon Sep 17 00:00:00 2001 From: Guus Sliepen Date: Sun, 17 Apr 2016 16:23:31 +0200 Subject: [PATCH] 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. --- src/net_setup.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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++) { -- 2.20.1