Move free()s at the end om main() to the proper destructor functions.
[oweals/tinc.git] / src / net_setup.c
index f4246db25984e6a89ea19e12916bffdfca35e09b..d6d145ae1721b9a5d09dd9f7d44914e258883194 100644 (file)
@@ -608,6 +608,8 @@ void close_network_connections(void)
 
        execute_script("tinc-down", envp);
 
+       if(myport) free(myport);
+
        for(i = 0; i < 4; i++)
                free(envp[i]);