[tor-commits] [tor/master] Remove unused NULL check in hs_service_add_ephemeral(), mention we take ownership of auth_clients_v3
asn at torproject.org
asn at torproject.org
Mon Feb 8 11:35:16 UTC 2021
commit 65d60a16d96ad6e7f824225e3b9b109783575379
Author: Neel Chauhan <neel at neelc.org>
Date: Tue Dec 8 10:46:44 2020 -0800
Remove unused NULL check in hs_service_add_ephemeral(), mention we take ownership of auth_clients_v3
---
src/feature/hs/hs_service.c | 11 +++++------
1 file 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
More information about the tor-commits
mailing list