]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Add a redundant memset to node_get_pref_ipv6_orport()
authorNick Mathewson <nickm@torproject.org>
Tue, 17 Apr 2018 23:41:10 +0000 (19:41 -0400)
committerNick Mathewson <nickm@torproject.org>
Tue, 17 Apr 2018 23:41:10 +0000 (19:41 -0400)
For whatever reason, clang's scan-build isn't sure that this
function actually initializes its output.

src/or/nodelist.c

index 71eee3fa2170d0c295e9b41e9b475cfbf3475ccb..81a5c944ace55b00118cdf53265e5c91275c2b83 100644 (file)
@@ -1517,6 +1517,7 @@ node_get_pref_ipv6_orport(const node_t *node, tor_addr_port_t *ap_out)
 {
   node_assert_ok(node);
   tor_assert(ap_out);
+  memset(ap_out, 0, sizeof(*ap_out));
 
   /* Check ri first, because rewrite_node_address_for_bridge() updates
    * node->ri with the configured bridge address.