Add missing cleanup functions in close_network_connections().
authorGuus Sliepen <guus@tinc-vpn.org>
Mon, 19 Jan 2009 22:17:28 +0000 (23:17 +0100)
committerGuus Sliepen <guus@tinc-vpn.org>
Mon, 19 Jan 2009 22:17:28 +0000 (23:17 +0100)
src/net_setup.c

index d6d145a..f52afb0 100644 (file)
@@ -586,6 +586,7 @@ void close_network_connections(void)
        if(myself && myself->connection) {
                subnet_update(myself, NULL, false);
                terminate_connection(myself->connection, false);
+               free_connection(myself->connection);
        }
 
        for(i = 0; i < listen_sockets; i++) {
@@ -610,6 +611,8 @@ void close_network_connections(void)
 
        if(myport) free(myport);
 
+       EVP_CIPHER_CTX_cleanup(&packet_ctx);
+
        for(i = 0; i < 4; i++)
                free(envp[i]);