Add tests for network commands
[tinc] / src / net_socket.c
index 92dcbed..4c76c30 100644 (file)
@@ -869,12 +869,12 @@ void try_outgoing_connections(void) {
                                node_add(n);
                        }
 
-                       free(name);
-
                        outgoing->node = n;
                        list_insert_tail(&outgoing_list, outgoing);
                        setup_outgoing_connection(outgoing, true);
                }
+
+               free(name);
        }
 
        /* Terminate any connections whose outgoing_t is to be deleted. */