aboutsummaryrefslogtreecommitdiff
path: root/src/or/ext_orport.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/or/ext_orport.c')
-rw-r--r--src/or/ext_orport.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/or/ext_orport.c b/src/or/ext_orport.c
index f83002c18..8fd9b77c8 100644
--- a/src/or/ext_orport.c
+++ b/src/or/ext_orport.c
@@ -460,6 +460,12 @@ connection_ext_or_handle_cmd_transport(or_connection_t *conn,
return -1;
}
+ /* If ext_or_transport is already occupied (because the PT sent two
+ * TRANSPORT commands), deallocate the old name and keep the new
+ * one */
+ if (conn->ext_or_transport)
+ tor_free(conn->ext_or_transport);
+
conn->ext_or_transport = transport_str;
return 0;
}