mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-27 13:53:31 +01:00
Add an initialization case to node_get_prim_dirport
Fixes a bug found by scan-build; bugfix on c2fa743806
. Bug not in
any released Tor.
This commit is contained in:
parent
31a450a5b6
commit
1abe0a5769
@ -1583,6 +1583,11 @@ node_get_prim_dirport(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. */
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user