diff options
author | Nick Mathewson <nickm@torproject.org> | 2005-08-04 18:29:01 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2005-08-04 18:29:01 +0000 |
commit | 303258972b6e87eeaa8f32ff9b2d3aeb1ad6be45 (patch) | |
tree | c2a3a098ce1fc93243e288053d9cbca4d9b4efd4 | |
parent | e9698eaefabd471b5b9fae0d6fa4da87541f2b0c (diff) | |
download | tor-303258972b6e87eeaa8f32ff9b2d3aeb1ad6be45.tar.gz tor-303258972b6e87eeaa8f32ff9b2d3aeb1ad6be45.zip |
Fix idiot bug. The "free the IP history" code belons in connection_free_all(), not in connection_free(). You can all mock me now.
svn:r4691
-rw-r--r-- | src/or/connection.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/or/connection.c b/src/or/connection.c index a28bd42961..855fc9e399 100644 --- a/src/or/connection.c +++ b/src/or/connection.c @@ -255,10 +255,6 @@ connection_free(connection_t *conn) } connection_unregister(conn); _connection_free(conn); - - SMARTLIST_FOREACH(outgoing_addrs, void*, addr, tor_free(addr)); - smartlist_free(outgoing_addrs); - outgoing_addrs = NULL; } /** Call _connection_free() on every connection in our array, and release all @@ -278,6 +274,12 @@ connection_free_all(void) get_connection_array(&carray,&n); for (i=0;i<n;i++) _connection_free(carray[i]); + + if (outgoing_addrs) { + SMARTLIST_FOREACH(outgoing_addrs, void*, addr, tor_free(addr)); + smartlist_free(outgoing_addrs); + outgoing_addrs = NULL; + } } /** Do any cleanup needed: |