commit 635f58bad23282e27fbc5833dbaae978dab25934
parent 0133169481edd4094ec422da09bb68547bca4b50
Author: George Kadianakis <desnacked@riseup.net>
Date: Thu, 23 Jan 2020 00:31:29 +0200
Introduce an hs_ob_free_all() function.
Diffstat:
2 files changed, 9 insertions(+), 0 deletions(-)
diff --git 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
@@ -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);
+}