]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
conn: Remove BUG() from connection_free_()
authorDavid Goulet <dgoulet@torproject.org>
Thu, 13 Nov 2025 19:49:24 +0000 (14:49 -0500)
committerDavid Goulet <dgoulet@torproject.org>
Thu, 13 Nov 2025 19:49:24 +0000 (14:49 -0500)
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>
src/core/mainloop/connection.c

index 5a769f38bec6f45e5c1a4aee47f3c401af37df5b..dd7794996ad169813489b1702bb1338aceb673f6 100644 (file)
@@ -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)