summaryrefslogtreecommitdiff
path: root/src/feature/hs/hs_service.c
diff options
context:
space:
mode:
authorNeel Chauhan <neel@neelc.org>2020-12-08 10:46:44 -0800
committerNeel Chauhan <neel@neelc.org>2020-12-08 10:47:05 -0800
commit65d60a16d96ad6e7f824225e3b9b109783575379 (patch)
tree5f207a67b4b2a454088ec7a56348d7cc0bbf7c12 /src/feature/hs/hs_service.c
parent7d54734900e3a11f007d9fdff1188be7cc2e7a01 (diff)
downloadtor-65d60a16d96ad6e7f824225e3b9b109783575379.tar.gz
tor-65d60a16d96ad6e7f824225e3b9b109783575379.zip
Remove unused NULL check in hs_service_add_ephemeral(), mention we take ownership of auth_clients_v3
Diffstat (limited to 'src/feature/hs/hs_service.c')
-rw-r--r--src/feature/hs/hs_service.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/feature/hs/hs_service.c b/src/feature/hs/hs_service.c
index aaf5833a87..eb4e3c2b78 100644
--- a/src/feature/hs/hs_service.c
+++ b/src/feature/hs/hs_service.c
@@ -3700,9 +3700,10 @@ hs_service_upload_desc_to_dir(const char *encoded_desc,
/** Add the ephemeral service using the secret key sk and ports. Both max
* streams parameter will be set in the newly created service.
*
- * Ownership of sk and ports is passed to this routine. Regardless of
- * success/failure, callers should not touch these values after calling this
- * routine, and may assume that correct cleanup has been done on failure.
+ * Ownership of sk, ports, and auth_clients_v3 is passed to this routine.
+ * Regardless of success/failure, callers should not touch these values
+ * after calling this routine, and may assume that correct cleanup has
+ * been done on failure.
*
* Return an appropriate hs_service_add_ephemeral_status_t. */
hs_service_add_ephemeral_status_t
@@ -3754,9 +3755,7 @@ hs_service_add_ephemeral(ed25519_secret_key_t *sk, smartlist_t *ports,
}
if (auth_clients_v3) {
- if (service->config.clients == NULL) {
- service->config.clients = auth_clients_v3;
- }
+ service->config.clients = auth_clients_v3;
}
/* Build the onion address for logging purposes but also the control port