diff options
author | George Kadianakis <desnacked@riseup.net> | 2019-04-08 16:18:44 +0300 |
---|---|---|
committer | George Kadianakis <desnacked@riseup.net> | 2019-05-03 18:15:11 +0300 |
commit | f5635989b06260710b282e75be7b731e2846f700 (patch) | |
tree | 62c67a6dfd0618a65470c1975d54a7c79217f9c5 /src/test/test_relaycrypt.c | |
parent | 18d61c0e6e71dace189384c8af7f4fec158969b3 (diff) | |
download | tor-f5635989b06260710b282e75be7b731e2846f700.tar.gz tor-f5635989b06260710b282e75be7b731e2846f700.zip |
Hiding crypt_path_t: Create a constructor for crypt_path_t.
We are using an opaque pointer so the structure needs to be allocated on the
heap. This means we now need a constructor for crypt_path_t.
Also modify all places initializing a crypt_path_t to use the constructor.
Diffstat (limited to 'src/test/test_relaycrypt.c')
-rw-r--r-- | src/test/test_relaycrypt.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/test/test_relaycrypt.c b/src/test/test_relaycrypt.c index b94ee07abc..1fe5df96ed 100644 --- a/src/test/test_relaycrypt.c +++ b/src/test/test_relaycrypt.c @@ -50,7 +50,7 @@ testing_circuitset_setup(const struct testcase_t *testcase) cs->origin_circ = origin_circuit_new(); cs->origin_circ->base_.purpose = CIRCUIT_PURPOSE_C_GENERAL; for (i=0; i<3; ++i) { - crypt_path_t *hop = tor_malloc_zero(sizeof(*hop)); + crypt_path_t *hop = crypt_path_new(); relay_crypto_init(&hop->private->crypto, KEY_MATERIAL[i], sizeof(KEY_MATERIAL[i]), 0, 0); hop->state = CPATH_STATE_OPEN; |