diff options
author | Neel Chauhan <neel@neelc.org> | 2020-11-19 11:27:25 -0800 |
---|---|---|
committer | Neel Chauhan <neel@neelc.org> | 2020-11-19 12:00:56 -0800 |
commit | 157fe4597e5876cb7af4f4f467db1ffaff4bd9ce (patch) | |
tree | 657ae0566defd2d310f1dd832c87ccbae69b4b49 /src/feature/hs | |
parent | af48afe667388ce1559b560c64e6416b414ada3e (diff) | |
download | tor-157fe4597e5876cb7af4f4f467db1ffaff4bd9ce.tar.gz tor-157fe4597e5876cb7af4f4f467db1ffaff4bd9ce.zip |
Add tests for bug #40084
Diffstat (limited to 'src/feature/hs')
-rw-r--r-- | src/feature/hs/hs_service.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/feature/hs/hs_service.c b/src/feature/hs/hs_service.c index 0d7441ada2..53b90ce374 100644 --- a/src/feature/hs/hs_service.c +++ b/src/feature/hs/hs_service.c @@ -3756,9 +3756,11 @@ hs_service_add_ephemeral(ed25519_secret_key_t *sk, smartlist_t *ports, if (service->config.clients == NULL) { service->config.clients = smartlist_new(); } - SMARTLIST_FOREACH(auth_clients_v3, hs_service_authorized_client_t *, c, - smartlist_add(service->config.clients, c)); - + SMARTLIST_FOREACH(auth_clients_v3, hs_service_authorized_client_t *, c, { + if (c != NULL) { + smartlist_add(service->config.clients, c); + } + }); /* Build the onion address for logging purposes but also the control port * uses it for the HS_DESC event. */ |