]> git.meshlink.io Git - meshlink/commitdiff
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 d6d145ae1721b9a5d09dd9f7d44914e258883194..f52afb046fc337b7ca9e17814bd0449b82659311 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]);