Browse Source

Check magic when removing old connection from map.

svn:r5508
Nick Mathewson 20 years ago
parent
commit
f0abb1a74b
1 changed files with 1 additions and 0 deletions
  1. 1 0
      src/or/circuitlist.c

+ 1 - 0
src/or/circuitlist.c

@@ -104,6 +104,7 @@ circuit_set_circid_orconn(circuit_t *circ, uint16_t id,
   }
   }
 
 
   if (old_conn) { /* we may need to remove it from the conn-circid map */
   if (old_conn) { /* we may need to remove it from the conn-circid map */
+    tor_assert(old_conn->magic == CONNECTION_MAGIC);
     search.circ_id = old_id;
     search.circ_id = old_id;
     search.or_conn = old_conn;
     search.or_conn = old_conn;
     found = HT_REMOVE(orconn_circid_map, &orconn_circid_circuit_map, &search);
     found = HT_REMOVE(orconn_circid_map, &orconn_circid_circuit_map, &search);