[tor-commits] [tor/master] Don't call tor_tls_set_logged_address till after checking conn->tls.
nickm at torproject.org
nickm at torproject.org
Tue Dec 20 19:48:39 UTC 2011
commit 0cfdd88adb6fcd6f75d0e571ed2cc9ae3e559ded
Author: George Kadianakis <desnacked at gmail.com>
Date: Tue Dec 20 19:17:58 2011 +0100
Don't call tor_tls_set_logged_address till after checking conn->tls.
Fixes bug 4531.
---
src/or/connection_or.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/or/connection_or.c b/src/or/connection_or.c
index cbe678d..7609138 100644
--- a/src/or/connection_or.c
+++ b/src/or/connection_or.c
@@ -1099,12 +1099,13 @@ connection_tls_start_handshake(or_connection_t *conn, int receiving)
conn->_base.state = OR_CONN_STATE_TLS_HANDSHAKING;
tor_assert(!conn->tls);
conn->tls = tor_tls_new(conn->_base.s, receiving);
- tor_tls_set_logged_address(conn->tls, // XXX client and relay?
- escaped_safe_str(conn->_base.address));
if (!conn->tls) {
log_warn(LD_BUG,"tor_tls_new failed. Closing.");
return -1;
}
+ tor_tls_set_logged_address(conn->tls, // XXX client and relay?
+ escaped_safe_str(conn->_base.address));
+
#ifdef USE_BUFFEREVENTS
if (connection_type_uses_bufferevent(TO_CONN(conn))) {
const int filtering = get_options()->_UseFilteringSSLBufferevents;
More information about the tor-commits
mailing list