mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-12-06 19:41:15 +01:00
hs-v3: Fix memory leak in test_hs_control_store_permanent_creds()
This commit is contained in:
committed by
David Goulet
parent
3b64c6b6fc
commit
c959ea7558
@@ -525,6 +525,7 @@ test_hs_control_store_permanent_creds(void *arg)
|
||||
{ /* Setup ClientOnionAuthDir */
|
||||
int ret;
|
||||
char *perm_creds_dir = tor_strdup(get_fname("permanent_credentials"));
|
||||
get_options_mutable()->ClientOnionAuthDir = perm_creds_dir;
|
||||
|
||||
#ifdef _WIN32
|
||||
ret = mkdir(perm_creds_dir);
|
||||
@@ -532,8 +533,6 @@ test_hs_control_store_permanent_creds(void *arg)
|
||||
ret = mkdir(perm_creds_dir, 0700);
|
||||
#endif
|
||||
tt_int_op(ret, OP_EQ, 0);
|
||||
|
||||
get_options_mutable()->ClientOnionAuthDir = perm_creds_dir;
|
||||
}
|
||||
|
||||
tor_free(args);
|
||||
@@ -622,6 +621,7 @@ test_hs_control_store_permanent_creds(void *arg)
|
||||
tt_uint_op(digest256map_size(client_auths), OP_EQ, 0);
|
||||
|
||||
done:
|
||||
tor_free(get_options_mutable()->ClientOnionAuthDir);
|
||||
tor_free(args);
|
||||
tor_free(cp1);
|
||||
buf_free(TO_CONN(&conn)->outbuf);
|
||||
|
||||
Reference in New Issue
Block a user