Browse Source

Short-term fix: prevent possible segfault in connection_close_unattached_ap

svn:r3970
Nick Mathewson 20 years ago
parent
commit
0d6c9c47b3
1 changed files with 2 additions and 1 deletions
  1. 2 1
      src/or/connection_edge.c

+ 2 - 1
src/or/connection_edge.c

@@ -38,7 +38,8 @@ connection_close_unattached_ap(connection_t *conn, int endreason) {
 // be defined yet. -RD
     if (endreason == END_STREAM_REASON_ALREADY_SOCKS_REPLIED)
       log_fn(LOG_WARN,"Bug: stream (marked at %s:%d) sending two socks replies?",
-             conn->marked_for_close_file, conn->marked_for_close);
+             conn->marked_for_close_file?conn->marked_for_close_file:"", 
+             conn->marked_for_close);
 
     if (conn->socks_request->command == SOCKS_COMMAND_CONNECT)
       connection_ap_handshake_socks_reply(conn, NULL, 0, socksreason);