Commit a48ba072 authored by Nick Mathewson's avatar Nick Mathewson
Browse files

Rename connection_free_ to connection_free_minimal.

parent b0cc9856
......@@ -499,7 +499,7 @@ conn_listener_type_supports_af_unix(int type)
* if <b>conn</b> is an OR or OP connection.
*/
STATIC void
connection_free_(connection_t *conn)
connection_free_minimal(connection_t *conn)
{
void *mem;
size_t memlen;
......@@ -704,7 +704,7 @@ connection_free,(connection_t *conn))
}
#endif /* 1 */
connection_unregister_events(conn);
connection_free_(conn);
connection_free_minimal(conn);
}
/**
......@@ -5239,8 +5239,8 @@ proxy_type_to_string(int proxy_type)
return NULL; /*Unreached*/
}
/** Call connection_free_() on every connection in our array, and release all
* storage held by connection.c.
/** Call connection_free_minimal() on every connection in our array, and
* release all storage held by connection.c.
*
* Don't do the checks in connection_free(), because they will
* fail.
......@@ -5264,7 +5264,8 @@ connection_free_all(void)
/* Clear out our list of broken connections */
clear_broken_connection_map(0);
SMARTLIST_FOREACH(conns, connection_t *, conn, connection_free_(conn));
SMARTLIST_FOREACH(conns, connection_t *, conn,
connection_free_minimal(conn));
if (outgoing_addrs) {
SMARTLIST_FOREACH(outgoing_addrs, tor_addr_t *, addr, tor_free(addr));
......
......@@ -267,7 +267,7 @@ connection_is_moribund(connection_t *conn)
void connection_check_oos(int n_socks, int failed);
#ifdef CONNECTION_PRIVATE
STATIC void connection_free_(connection_t *conn);
STATIC void connection_free_minimal(connection_t *conn);
/* Used only by connection.c and test*.c */
uint32_t bucket_millis_empty(int tokens_before, uint32_t last_empty_time,
......
......@@ -88,7 +88,7 @@ test_dir_handle_get_bad_request(void *data)
done:
UNMOCK(connection_write_to_buf_impl_);
connection_free_(TO_CONN(conn));
connection_free_minimal(TO_CONN(conn));
tor_free(header);
}
......@@ -117,7 +117,7 @@ test_dir_handle_get_v1_command_not_found(void *data)
done:
UNMOCK(connection_write_to_buf_impl_);
connection_free_(TO_CONN(conn));
connection_free_minimal(TO_CONN(conn));
tor_free(header);
}
......@@ -164,7 +164,7 @@ test_dir_handle_get_v1_command(void *data)
done:
UNMOCK(connection_write_to_buf_impl_);
UNMOCK(get_dirportfrontpage);
connection_free_(TO_CONN(conn));
connection_free_minimal(TO_CONN(conn));
tor_free(header);
tor_free(body);
}
......@@ -190,7 +190,7 @@ test_dir_handle_get_not_found(void *data)
done:
UNMOCK(connection_write_to_buf_impl_);
connection_free_(TO_CONN(conn));
connection_free_minimal(TO_CONN(conn));
tor_free(header);
}
......@@ -225,7 +225,7 @@ test_dir_handle_get_robots_txt(void *data)
done:
UNMOCK(connection_write_to_buf_impl_);
connection_free_(TO_CONN(conn));
connection_free_minimal(TO_CONN(conn));
tor_free(header);
tor_free(body);
}
......@@ -254,7 +254,7 @@ test_dir_handle_get_rendezvous2_not_found_if_not_encrypted(void *data)
done:
UNMOCK(connection_write_to_buf_impl_);
connection_free_(TO_CONN(conn));
connection_free_minimal(TO_CONN(conn));
tor_free(header);
}
......@@ -282,7 +282,7 @@ test_dir_handle_get_rendezvous2_on_encrypted_conn_with_invalid_desc_id(
done:
UNMOCK(connection_write_to_buf_impl_);
connection_free_(TO_CONN(conn));
connection_free_minimal(TO_CONN(conn));
tor_free(header);
}
......@@ -315,7 +315,7 @@ test_dir_handle_get_rendezvous2_on_encrypted_conn_not_well_formed(void *data)
done:
UNMOCK(connection_write_to_buf_impl_);
connection_free_(TO_CONN(conn));
connection_free_minimal(TO_CONN(conn));
tor_free(header);
}
......@@ -344,7 +344,7 @@ test_dir_handle_get_rendezvous2_not_found(void *data)
done:
UNMOCK(connection_write_to_buf_impl_);
connection_free_(TO_CONN(conn));
connection_free_minimal(TO_CONN(conn));
tor_free(header);
rend_cache_free_all();
}
......@@ -424,7 +424,7 @@ test_dir_handle_get_rendezvous2_on_encrypted_conn_success(void *data)
UNMOCK(connection_write_to_buf_impl_);
NS_UNMOCK(router_get_my_routerinfo);
connection_free_(TO_CONN(conn));
connection_free_minimal(TO_CONN(conn));
tor_free(header);
tor_free(body);
rend_encoded_v2_service_descriptor_free(desc_holder);
......@@ -457,7 +457,7 @@ test_dir_handle_get_micro_d_not_found(void *data)
done:
UNMOCK(connection_write_to_buf_impl_);
connection_free_(TO_CONN(conn));
connection_free_minimal(TO_CONN(conn));
tor_free(header);
}
......@@ -541,7 +541,7 @@ test_dir_handle_get_micro_d(void *data)
UNMOCK(connection_write_to_buf_impl_);
or_options_free(mock_options); mock_options = NULL;
connection_free_(TO_CONN(conn));
connection_free_minimal(TO_CONN(conn));
tor_free(header);
tor_free(body);
smartlist_free(list);
......@@ -595,7 +595,7 @@ test_dir_handle_get_micro_d_server_busy(void *data)
UNMOCK(connection_write_to_buf_impl_);
or_options_free(mock_options); mock_options = NULL;
connection_free_(TO_CONN(conn));
connection_free_minimal(TO_CONN(conn));
tor_free(header);
smartlist_free(list);
microdesc_free_all();
......@@ -632,7 +632,7 @@ test_dir_handle_get_networkstatus_bridges_not_found_without_auth(void *data)
UNMOCK(get_options);
UNMOCK(connection_write_to_buf_impl_);
or_options_free(mock_options); mock_options = NULL;
connection_free_(TO_CONN(conn));
connection_free_minimal(TO_CONN(conn));
tor_free(header);
}
......@@ -672,7 +672,7 @@ test_dir_handle_get_networkstatus_bridges(void *data)
UNMOCK(get_options);
UNMOCK(connection_write_to_buf_impl_);
or_options_free(mock_options); mock_options = NULL;
connection_free_(TO_CONN(conn));
connection_free_minimal(TO_CONN(conn));
tor_free(header);
}
......@@ -709,7 +709,7 @@ test_dir_handle_get_networkstatus_bridges_not_found_wrong_auth(void *data)
UNMOCK(get_options);
UNMOCK(connection_write_to_buf_impl_);
or_options_free(mock_options); mock_options = NULL;
connection_free_(TO_CONN(conn));
connection_free_minimal(TO_CONN(conn));
tor_free(header);
}
......@@ -737,7 +737,7 @@ test_dir_handle_get_server_descriptors_not_found(void* data)
done:
UNMOCK(connection_write_to_buf_impl_);
or_options_free(mock_options); mock_options = NULL;
connection_free_(TO_CONN(conn));
connection_free_minimal(TO_CONN(conn));
tor_free(header);
}
......@@ -798,7 +798,7 @@ test_dir_handle_get_server_descriptors_all(void* data)
done:
NS_UNMOCK(router_get_my_routerinfo);
UNMOCK(connection_write_to_buf_impl_);
connection_free_(TO_CONN(conn));
connection_free_minimal(TO_CONN(conn));
tor_free(header);
tor_free(body);
......@@ -902,7 +902,7 @@ test_dir_handle_get_server_descriptors_authority(void* data)
UNMOCK(connection_write_to_buf_impl_);
tor_free(mock_routerinfo->cache_info.signed_descriptor_body);
tor_free(mock_routerinfo);
connection_free_(TO_CONN(conn));
connection_free_minimal(TO_CONN(conn));
tor_free(header);
tor_free(body);
crypto_pk_free(identity_pkey);
......@@ -974,7 +974,7 @@ test_dir_handle_get_server_descriptors_fp(void* data)
UNMOCK(connection_write_to_buf_impl_);
tor_free(mock_routerinfo->cache_info.signed_descriptor_body);
tor_free(mock_routerinfo);
connection_free_(TO_CONN(conn));
connection_free_minimal(TO_CONN(conn));
tor_free(header);
tor_free(body);
crypto_pk_free(identity_pkey);
......@@ -1038,7 +1038,7 @@ test_dir_handle_get_server_descriptors_d(void* data)
done:
UNMOCK(connection_write_to_buf_impl_);
tor_free(mock_routerinfo);
connection_free_(TO_CONN(conn));
connection_free_minimal(TO_CONN(conn));
tor_free(header);
tor_free(body);
crypto_pk_free(identity_pkey);
......@@ -1094,7 +1094,7 @@ test_dir_handle_get_server_descriptors_busy(void* data)
UNMOCK(get_options);
UNMOCK(connection_write_to_buf_impl_);
tor_free(mock_routerinfo);
connection_free_(TO_CONN(conn));
connection_free_minimal(TO_CONN(conn));
tor_free(header);
crypto_pk_free(identity_pkey);
......@@ -1125,7 +1125,7 @@ test_dir_handle_get_server_keys_bad_req(void* data)
done:
UNMOCK(connection_write_to_buf_impl_);
connection_free_(TO_CONN(conn));
connection_free_minimal(TO_CONN(conn));
tor_free(header);
}
......@@ -1151,7 +1151,7 @@ test_dir_handle_get_server_keys_all_not_found(void* data)
done:
UNMOCK(connection_write_to_buf_impl_);
connection_free_(TO_CONN(conn));
connection_free_minimal(TO_CONN(conn));
tor_free(header);
}
......@@ -1210,7 +1210,7 @@ test_dir_handle_get_server_keys_all(void* data)
done:
UNMOCK(connection_write_to_buf_impl_);
connection_free_(TO_CONN(conn));
connection_free_minimal(TO_CONN(conn));
tor_free(header);
tor_free(body);
......@@ -1240,7 +1240,7 @@ test_dir_handle_get_server_keys_authority_not_found(void* data)
done:
UNMOCK(connection_write_to_buf_impl_);
connection_free_(TO_CONN(conn));
connection_free_minimal(TO_CONN(conn));
tor_free(header);
}
......@@ -1288,7 +1288,7 @@ test_dir_handle_get_server_keys_authority(void* data)
done:
UNMOCK(get_my_v3_authority_cert);
UNMOCK(connection_write_to_buf_impl_);
connection_free_(TO_CONN(conn));
connection_free_minimal(TO_CONN(conn));
tor_free(header);
tor_free(body);
authority_cert_free(mock_cert); mock_cert = NULL;
......@@ -1316,7 +1316,7 @@ test_dir_handle_get_server_keys_fp_not_found(void* data)
done:
UNMOCK(connection_write_to_buf_impl_);
connection_free_(TO_CONN(conn));
connection_free_minimal(TO_CONN(conn));
tor_free(header);
}
......@@ -1370,7 +1370,7 @@ test_dir_handle_get_server_keys_fp(void* data)
done:
UNMOCK(connection_write_to_buf_impl_);
connection_free_(TO_CONN(conn));
connection_free_minimal(TO_CONN(conn));
tor_free(header);
tor_free(body);
clear_dir_servers();
......@@ -1399,7 +1399,7 @@ test_dir_handle_get_server_keys_sk_not_found(void* data)
done:
UNMOCK(connection_write_to_buf_impl_);
connection_free_(TO_CONN(conn));
connection_free_minimal(TO_CONN(conn));
tor_free(header);
}
......@@ -1444,7 +1444,7 @@ test_dir_handle_get_server_keys_sk(void* data)
done:
UNMOCK(get_my_v3_authority_cert);
UNMOCK(connection_write_to_buf_impl_);
connection_free_(TO_CONN(conn));
connection_free_minimal(TO_CONN(conn));
authority_cert_free(mock_cert); mock_cert = NULL;
tor_free(header);
tor_free(body);
......@@ -1472,7 +1472,7 @@ test_dir_handle_get_server_keys_fpsk_not_found(void* data)
done:
UNMOCK(connection_write_to_buf_impl_);
connection_free_(TO_CONN(conn));
connection_free_minimal(TO_CONN(conn));
tor_free(header);
}
......@@ -1529,7 +1529,7 @@ test_dir_handle_get_server_keys_fpsk(void* data)
done:
UNMOCK(connection_write_to_buf_impl_);
connection_free_(TO_CONN(conn));
connection_free_minimal(TO_CONN(conn));
tor_free(header);
tor_free(body);
......@@ -1583,7 +1583,7 @@ test_dir_handle_get_server_keys_busy(void* data)
done:
UNMOCK(get_options);
UNMOCK(connection_write_to_buf_impl_);
connection_free_(TO_CONN(conn));
connection_free_minimal(TO_CONN(conn));
tor_free(header);
or_options_free(mock_options); mock_options = NULL;
......@@ -1649,7 +1649,7 @@ test_dir_handle_get_status_vote_current_consensus_ns_not_enough_sigs(void* d)
UNMOCK(connection_write_to_buf_impl_);
UNMOCK(get_options);
connection_free_(TO_CONN(conn));
connection_free_minimal(TO_CONN(conn));
tor_free(header);
tor_free(stats);
smartlist_free(mock_ns_val->voters);
......@@ -1690,7 +1690,7 @@ test_dir_handle_get_status_vote_current_consensus_ns_not_found(void* data)
done:
UNMOCK(connection_write_to_buf_impl_);
UNMOCK(get_options);
connection_free_(TO_CONN(conn));
connection_free_minimal(TO_CONN(conn));
tor_free(header);
tor_free(stats);
or_options_free(mock_options); mock_options = NULL;
......@@ -1764,7 +1764,7 @@ test_dir_handle_get_status_vote_current_consensus_too_old(void *data)
UNMOCK(networkstatus_get_latest_consensus_by_flavor);
UNMOCK(connection_write_to_buf_impl_);
UNMOCK(get_options);
connection_free_(TO_CONN(conn));
connection_free_minimal(TO_CONN(conn));
tor_free(header);
tor_free(mock_ns_val);
or_options_free(mock_options); mock_options = NULL;
......@@ -1825,7 +1825,7 @@ status_vote_current_consensus_ns_test(char **header, char **body,
done:
UNMOCK(connection_write_to_buf_impl_);
connection_free_(TO_CONN(conn));
connection_free_minimal(TO_CONN(conn));
}
static void
......@@ -1948,7 +1948,7 @@ test_dir_handle_get_status_vote_current_not_found(void* data)
done:
UNMOCK(connection_write_to_buf_impl_);
connection_free_(TO_CONN(conn));
connection_free_minimal(TO_CONN(conn));
tor_free(header);
}
......@@ -1971,7 +1971,7 @@ status_vote_current_d_test(char **header, char **body, size_t *body_l)
done:
UNMOCK(connection_write_to_buf_impl_);
connection_free_(TO_CONN(conn));
connection_free_minimal(TO_CONN(conn));
}
static void
......@@ -1991,7 +1991,7 @@ status_vote_next_d_test(char **header, char **body, size_t *body_l)
done:
UNMOCK(connection_write_to_buf_impl_);
connection_free_(TO_CONN(conn));
connection_free_minimal(TO_CONN(conn));
}
static void
......@@ -2116,7 +2116,7 @@ test_dir_handle_get_status_vote_next_not_found(void* data)
done:
UNMOCK(connection_write_to_buf_impl_);
connection_free_(TO_CONN(conn));
connection_free_minimal(TO_CONN(conn));
tor_free(header);
}
......@@ -2135,7 +2135,7 @@ status_vote_next_consensus_test(char **header, char **body, size_t *body_used)
body, body_used, 18, 0);
done:
UNMOCK(connection_write_to_buf_impl_);
connection_free_(TO_CONN(conn));
connection_free_minimal(TO_CONN(conn));
}
static void
......@@ -2175,7 +2175,7 @@ test_dir_handle_get_status_vote_current_authority_not_found(void* data)
done:
UNMOCK(connection_write_to_buf_impl_);
connection_free_(TO_CONN(conn));
connection_free_minimal(TO_CONN(conn));
tor_free(header);
}
......@@ -2199,7 +2199,7 @@ test_dir_handle_get_status_vote_next_authority_not_found(void* data)
done:
UNMOCK(connection_write_to_buf_impl_);
connection_free_(TO_CONN(conn));
connection_free_minimal(TO_CONN(conn));
tor_free(header);
}
......@@ -2281,7 +2281,7 @@ status_vote_next_consensus_signatures_test(char **header, char **body,
body, body_used, 22, 0);
done:
connection_free_(TO_CONN(conn));
connection_free_minimal(TO_CONN(conn));
UNMOCK(connection_write_to_buf_impl_);
}
......@@ -2429,7 +2429,7 @@ test_dir_handle_get_status_vote_next_authority(void* data)
done:
UNMOCK(connection_write_to_buf_impl_);
UNMOCK(get_my_v3_authority_cert);
connection_free_(TO_CONN(conn));
connection_free_minimal(TO_CONN(conn));
tor_free(header);
tor_free(body);
authority_cert_free(mock_cert); mock_cert = NULL;
......@@ -2511,7 +2511,7 @@ test_dir_handle_get_status_vote_current_authority(void* data)
done:
UNMOCK(connection_write_to_buf_impl_);
UNMOCK(get_my_v3_authority_cert);
connection_free_(TO_CONN(conn));
connection_free_minimal(TO_CONN(conn));
tor_free(header);
tor_free(body);
authority_cert_free(mock_cert); mock_cert = NULL;
......
......@@ -34,7 +34,7 @@ entryconn_rewrite_teardown(const struct testcase_t *tc, void *arg)
(void)tc;
entry_connection_t *ec = arg;
if (ec)
connection_free_(ENTRY_TO_CONN(ec));
connection_free_minimal(ENTRY_TO_CONN(ec));
addressmap_free_all();
return 1;
}
......@@ -156,8 +156,8 @@ test_entryconn_rewrite_automap_ipv4(void *arg)
ec->socks_request->address);
done:
connection_free_(ENTRY_TO_CONN(ec2));
connection_free_(ENTRY_TO_CONN(ec3));
connection_free_minimal(ENTRY_TO_CONN(ec2));
connection_free_minimal(ENTRY_TO_CONN(ec3));
}
/* Automap on resolve, connect to automapped address, resolve again and get
......@@ -230,9 +230,9 @@ test_entryconn_rewrite_automap_ipv6(void *arg)
ec->socks_request->address);
done:
connection_free_(ENTRY_TO_CONN(ec));
connection_free_(ENTRY_TO_CONN(ec2));
connection_free_(ENTRY_TO_CONN(ec3));
connection_free_minimal(ENTRY_TO_CONN(ec));
connection_free_minimal(ENTRY_TO_CONN(ec2));
connection_free_minimal(ENTRY_TO_CONN(ec3));
}
#if 0
......@@ -283,7 +283,7 @@ test_entryconn_rewrite_automap_reverse(void *arg)
tt_int_op(rr.exit_source, OP_EQ, ADDRMAPSRC_NONE);
done:
connection_free_(ENTRY_TO_CONN(ec2));
connection_free_minimal(ENTRY_TO_CONN(ec2));
}
#endif /* 0 */
......@@ -333,7 +333,7 @@ test_entryconn_rewrite_cached_dns_ipv4(void *arg)
tt_str_op(ec2->socks_request->address, OP_EQ, "240.240.241.241");
done:
connection_free_(ENTRY_TO_CONN(ec2));
connection_free_minimal(ENTRY_TO_CONN(ec2));
}
/* Rewrite because of cached DNS entry. */
......@@ -385,8 +385,8 @@ test_entryconn_rewrite_cached_dns_ipv6(void *arg)
tt_str_op(ec2->socks_request->address, OP_EQ, "[::f00f]");
done:
connection_free_(ENTRY_TO_CONN(ec));
connection_free_(ENTRY_TO_CONN(ec2));
connection_free_minimal(ENTRY_TO_CONN(ec));
connection_free_minimal(ENTRY_TO_CONN(ec2));
}
/* Fail to connect to unmapped address in virtual range. */
......@@ -426,7 +426,7 @@ test_entryconn_rewrite_unmapped_virtual(void *arg)
tt_int_op(rr.exit_source, OP_EQ, ADDRMAPSRC_NONE);
done:
connection_free_(ENTRY_TO_CONN(ec2));
connection_free_minimal(ENTRY_TO_CONN(ec2));
}
/* Rewrite because of mapaddress option */
......@@ -507,7 +507,7 @@ test_entryconn_rewrite_automap_exit(void *arg)
tt_int_op(rr.end_reason, OP_EQ, END_STREAM_REASON_TORPROTOCOL);
done:
connection_free_(ENTRY_TO_CONN(ec2));
connection_free_minimal(ENTRY_TO_CONN(ec2));
}
/* Rewrite into .exit because of mapaddress */
......@@ -618,9 +618,9 @@ test_entryconn_rewrite_mapaddress_automap_onion(void *arg)
*/
done:
connection_free_(ENTRY_TO_CONN(ec2));
connection_free_(ENTRY_TO_CONN(ec3));
connection_free_(ENTRY_TO_CONN(ec4));
connection_free_minimal(ENTRY_TO_CONN(ec2));
connection_free_minimal(ENTRY_TO_CONN(ec3));
connection_free_minimal(ENTRY_TO_CONN(ec4));
}
static void
......@@ -678,8 +678,8 @@ test_entryconn_rewrite_mapaddress_automap_onion_common(entry_connection_t *ec,
"abcdefghijklmnop.onion"));
done:
connection_free_(ENTRY_TO_CONN(ec2));
connection_free_(ENTRY_TO_CONN(ec3));
connection_free_minimal(ENTRY_TO_CONN(ec2));
connection_free_minimal(ENTRY_TO_CONN(ec3));
}
/* This time is the same, but we start with a mapping from a non-onion
......
......@@ -58,11 +58,11 @@ test_ext_or_id_map(void *arg)
done:
if (c1)
connection_free_(TO_CONN(c1));
connection_free_minimal(TO_CONN(c1));
if (c2)
connection_free_(TO_CONN(c2));
connection_free_minimal(TO_CONN(c2));
if (c3)
connection_free_(TO_CONN(c3));
connection_free_minimal(TO_CONN(c3));
tor_free(idp);
tor_free(idp2);
connection_or_clear_ext_or_id_map();
......@@ -145,7 +145,7 @@ test_ext_or_write_command(void *arg)
done:
if (c1)
connection_free_(TO_CONN(c1));
connection_free_minimal(TO_CONN(c1));
tor_free(cp);
tor_free(buf);
UNMOCK(connection_write_to_buf_impl_);
......@@ -591,7 +591,7 @@ test_ext_or_handshake(void *arg)
UNMOCK(connection_write_to_buf_impl_);
UNMOCK(crypto_rand);
if (conn)
connection_free_(TO_CONN(conn));
connection_free_minimal(TO_CONN(conn));
#undef CONTAINS
#undef WRITE
}
......
......@@ -259,7 +259,7 @@ helper_fetch_desc_from_hsdir(const ed25519_public_key_t *blinded_key)
done:
tor_free(hsdir_query_str);
if (conn)
connection_free_(TO_CONN(conn));
connection_free_minimal(TO_CONN(conn));
return received_desc;
}
......
......@@ -227,7 +227,7 @@ test_e2e_rend_circuit_setup_legacy(void *arg)
tt_ptr_op(TO_EDGE_CONN(conn)->on_circuit, OP_EQ, TO_CIRCUIT(or_circ));
done:
connection_free_(conn);
connection_free_minimal(conn);
if (or_circ)
tor_free(TO_CIRCUIT(or_circ)->n_chan);
circuit_free_(TO_CIRCUIT(or_circ));
......@@ -297,7 +297,7 @@ test_e2e_rend_circuit_setup(void *arg)
tt_ptr_op(TO_EDGE_CONN(conn)->on_circuit, OP_EQ, TO_CIRCUIT(or_circ));
done:
connection_free_(conn);
connection_free_minimal(conn);
if (or_circ)
tor_free(TO_CIRCUIT(or_circ)->n_chan);
circuit_free_(TO_CIRCUIT(or_circ));
......@@ -560,7 +560,7 @@ test_descriptor_fetch(void *arg)
smartlist_add(get_connection_array(), TO_CONN(dir_conn));
ret = hs_client_refetch_hsdesc(&service_pk);
smartlist_remove(get_connection_array(), TO_CONN(dir_conn));
connection_free_(TO_CONN(dir_conn));
connection_free_minimal(TO_CONN(dir_conn));
tt_int_op(ret, OP_EQ, HS_CLIENT_FETCH_PENDING);
}
......@@ -579,7 +579,7 @@ test_descriptor_fetch(void *arg)
tt_int_op(ec->edge_.end_reason, OP_EQ, END_STREAM_REASON_RESOLVEFAILED);
done:
connection_free_(ENTRY_TO_CONN(ec));
connection_free_minimal(ENTRY_TO_CONN(ec));
UNMOCK(networkstatus_get_live_consensus);
UNMOCK(router_have_minimum_dir_info);
hs_free_all();
......
......@@ -302,8 +302,8 @@ test_link_handshake_certs_ok(void *arg)
mock_own_cert = mock_peer_cert = NULL;
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));
connection_free_minimal(TO_CONN(c1));
connection_free_minimal(TO_CONN(c2));
tor_free(cell1);