mutt_socket_new is followed by a call to TAILQ_INSERT_HEAD; and
mutt_socket_free takes care of removing the Connection from the
Connection list. Make these two more in pair by making mutt_socket_new
adds the newly created Connection to the connection list.
struct Connection *conn = mutt_mem_calloc(1, sizeof(struct Connection));
conn->fd = -1;
+ TAILQ_INSERT_HEAD(&Connections, conn, entries);
+
return conn;
}
conn = mutt_socket_new();
memcpy(&conn->account, account, sizeof(struct Account));
- TAILQ_INSERT_HEAD(&Connections, conn, entries);
-
if (Tunnel && *Tunnel)
mutt_tunnel_socket_setup(conn);
else if (account->flags & MUTT_ACCT_SSL)