diff options
author | Nick Mathewson <nickm@torproject.org> | 2016-08-31 11:37:18 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2016-08-31 11:37:18 -0400 |
commit | 26a63a93033fd2f46558b7b1ec2140c4d309cc38 (patch) | |
tree | 1a507c291aa0bf0674bee9013459d1e78a959b11 /src | |
parent | 14c07f3f2199053e92c6bea90da332efbb3811e4 (diff) | |
download | tor-26a63a93033fd2f46558b7b1ec2140c4d309cc38.tar.gz tor-26a63a93033fd2f46558b7b1ec2140c4d309cc38.zip |
Fix all "BUG" warnings created from link-handshake tests.
Diffstat (limited to 'src')
-rw-r--r-- | src/test/test_link_handshake.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/test/test_link_handshake.c b/src/test/test_link_handshake.c index 4038783459..49e24abdcd 100644 --- a/src/test/test_link_handshake.c +++ b/src/test/test_link_handshake.c @@ -173,6 +173,8 @@ test_link_handshake_certs_ok(void *arg) UNMOCK(tor_tls_cert_matches_key); UNMOCK(connection_or_write_var_cell_to_buf); UNMOCK(connection_or_send_netinfo); + memset(c1->identity_digest, 0, sizeof(c1->identity_digest)); + memset(c2->identity_digest, 0, sizeof(c2->identity_digest)); connection_free_(TO_CONN(c1)); connection_free_(TO_CONN(c2)); tor_free(cell1); @@ -209,6 +211,7 @@ recv_certs_cleanup(const struct testcase_t *test, void *obj) if (d) { tor_free(d->cell); certs_cell_free(d->ccell); + connection_or_remove_from_identity_map(d->c); connection_free_(TO_CONN(d->c)); circuitmux_free(d->chan->base_.cmux); tor_free(d->chan); @@ -650,6 +653,8 @@ authenticate_data_cleanup(const struct testcase_t *test, void *arg) authenticate_data_t *d = arg; if (d) { tor_free(d->cell); + connection_or_remove_from_identity_map(d->c1); + connection_or_remove_from_identity_map(d->c2); connection_free_(TO_CONN(d->c1)); connection_free_(TO_CONN(d->c2)); circuitmux_free(d->chan2->base_.cmux); @@ -677,6 +682,8 @@ authenticate_data_setup(const struct testcase_t *test) MOCK(channel_set_circid_type, mock_set_circid_type); d->c1 = or_connection_new(CONN_TYPE_OR, AF_INET); d->c2 = or_connection_new(CONN_TYPE_OR, AF_INET); + tor_addr_from_ipv4h(&d->c1->base_.addr, 0x01020304); + tor_addr_from_ipv4h(&d->c2->base_.addr, 0x05060708); d->key1 = pk_generate(2); d->key2 = pk_generate(3); |