aboutsummaryrefslogtreecommitdiff
path: root/src/or/nodelist.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2017-10-23 15:55:48 -0400
committerNick Mathewson <nickm@torproject.org>2017-10-23 15:55:48 -0400
commitf0a6ea0bfd6afaa718c6b3d521a5d195d47ba56d (patch)
tree0c356d4e53bfc004ea69032c78edb2475c979d69 /src/or/nodelist.c
parentaf33fdd7c1860399fe8d6861c163e5d64b0292b9 (diff)
parent9ae4ffc0763fcb0a50d0d02be7d3362cc496adc1 (diff)
downloadtor-f0a6ea0bfd6afaa718c6b3d521a5d195d47ba56d.tar.gz
tor-f0a6ea0bfd6afaa718c6b3d521a5d195d47ba56d.zip
Merge branch 'maint-0.3.0' into maint-0.3.1
Diffstat (limited to 'src/or/nodelist.c')
-rw-r--r--src/or/nodelist.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/or/nodelist.c b/src/or/nodelist.c
index 3ac5c3e302..d09989d93f 100644
--- a/src/or/nodelist.c
+++ b/src/or/nodelist.c
@@ -1116,6 +1116,11 @@ node_get_prim_orport(const node_t *node, tor_addr_port_t *ap_out)
node_assert_ok(node);
tor_assert(ap_out);
+ /* Clear the address, as a safety precaution if calling functions ignore the
+ * return value */
+ tor_addr_make_null(&ap_out->addr, AF_INET);
+ ap_out->port = 0;
+
/* Check ri first, because rewrite_node_address_for_bridge() updates
* node->ri with the configured bridge address. */