commit b4fde9686e5e2fed47e781df09c41f2e45a42059
parent 5338394316a6e7e292a27cae61ae602257054efc
Author: David Goulet <dgoulet@torproject.org>
Date: Thu, 13 Nov 2025 14:49:24 -0500
conn: Remove BUG() from connection_free_()
Turns out that DNS resolving streams don't have a linked_conn and they can be
freed with that function in circuit_free_all() so remove the BUG() on it
because it is a legit code path.
Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/core/mainloop/connection.c b/src/core/mainloop/connection.c
@@ -975,7 +975,7 @@ connection_free_,(connection_t *conn))
return;
tor_assert(!connection_is_on_closeable_list(conn));
tor_assert(!connection_in_array(conn));
- if (BUG(conn->linked_conn)) {
+ if (conn->linked_conn) {
conn->linked_conn->linked_conn = NULL;
if (! conn->linked_conn->marked_for_close &&
conn->linked_conn->reading_from_linked_conn)