commit 635f58bad23282e27fbc5833dbaae978dab25934 Author: George Kadianakis desnacked@riseup.net Date: Thu Jan 23 00:31:29 2020 +0200
Introduce an hs_ob_free_all() function. --- src/feature/hs/hs_common.c | 2 ++ src/feature/hs/hs_ob.c | 7 +++++++ 2 files changed, 9 insertions(+)
diff --git a/src/feature/hs/hs_common.c b/src/feature/hs/hs_common.c index b2b52c480..4639cdb68 100644 --- a/src/feature/hs/hs_common.c +++ b/src/feature/hs/hs_common.c @@ -22,6 +22,7 @@ #include "feature/hs/hs_client.h" #include "feature/hs/hs_common.h" #include "feature/hs/hs_dos.h" +#include "feature/hs/hs_ob.h" #include "feature/hs/hs_ident.h" #include "feature/hs/hs_service.h" #include "feature/hs_common/shared_random_client.h" @@ -1829,6 +1830,7 @@ hs_free_all(void) hs_service_free_all(); hs_cache_free_all(); hs_client_free_all(); + hs_ob_free_all(); }
/** For the given origin circuit circ, decrement the number of rendezvous diff --git a/src/feature/hs/hs_ob.c b/src/feature/hs/hs_ob.c index 69fc51a8a..6a2e43f05 100644 --- a/src/feature/hs/hs_ob.c +++ b/src/feature/hs/hs_ob.c @@ -394,3 +394,10 @@ hs_ob_refresh_keys(hs_service_t *service) service->ob_subcreds = ob_subcreds; service->n_ob_subcreds = num_subcreds; } + +/** Free any memory allocated by the onionblance subsystem. */ +void +hs_ob_free_all(void) +{ + config_mgr_free(config_options_mgr); +}
tor-commits@lists.torproject.org