summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/feature/hs/hs_client.c7
-rw-r--r--src/feature/hs/hs_service.c7
2 files changed, 6 insertions, 8 deletions
diff --git a/src/feature/hs/hs_client.c b/src/feature/hs/hs_client.c
index 6f031eb3b9..a6384b87a3 100644
--- a/src/feature/hs/hs_client.c
+++ b/src/feature/hs/hs_client.c
@@ -1524,10 +1524,9 @@ parse_auth_file_content(const char *client_key_str)
if (seckey_b32) {
memwipe(seckey_b32, 0, strlen(seckey_b32));
}
- if (fields) {
- SMARTLIST_FOREACH(fields, char *, s, tor_free(s));
- smartlist_free(fields);
- }
+ tor_assert(fields);
+ SMARTLIST_FOREACH(fields, char *, s, tor_free(s));
+ smartlist_free(fields);
return auth;
}
diff --git a/src/feature/hs/hs_service.c b/src/feature/hs/hs_service.c
index 43e5626a57..30d23eb771 100644
--- a/src/feature/hs/hs_service.c
+++ b/src/feature/hs/hs_service.c
@@ -1192,10 +1192,9 @@ parse_authorized_client(const char *client_key_str)
if (pubkey_b32) {
memwipe(pubkey_b32, 0, strlen(pubkey_b32));
}
- if (fields) {
- SMARTLIST_FOREACH(fields, char *, s, tor_free(s));
- smartlist_free(fields);
- }
+ tor_assert(fields);
+ SMARTLIST_FOREACH(fields, char *, s, tor_free(s));
+ smartlist_free(fields);
return client;
}