]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
stop assuming that our downcasts have a struct offset of 0
authorRoger Dingledine <arma@torproject.org>
Sun, 22 Nov 2009 03:59:18 +0000 (22:59 -0500)
committerRoger Dingledine <arma@torproject.org>
Sun, 22 Nov 2009 03:59:18 +0000 (22:59 -0500)
shouldn't actually change anything, but who knows.

src/or/circuitlist.c
src/or/connection.c

index 560bec55f13ca224cada38fa5342dd3ee4f9ee46..3efeabe786fe636b4265cc4de79467eb72d9a587 100644 (file)
@@ -504,7 +504,7 @@ circuit_free(circuit_t *circ)
    * "active" checks will be violated. */
   cell_queue_clear(&circ->n_conn_cells);
 
-  memset(circ, 0xAA, memlen); /* poison memory */
+  memset(mem, 0xAA, memlen); /* poison memory */
   tor_free(mem);
 }
 
index aca9b8b116a0e0cc7585ac49349a2fb46224b9be..48740412c4a1437851d169cfc0f6e092a8090928 100644 (file)
@@ -423,7 +423,7 @@ _connection_free(connection_t *conn)
     connection_or_remove_from_identity_map(TO_OR_CONN(conn));
   }
 
-  memset(conn, 0xAA, memlen); /* poison memory */
+  memset(mem, 0xAA, memlen); /* poison memory */
   tor_free(mem);
 }