summaryrefslogtreecommitdiff
path: root/src/or/rendservice.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2005-02-10 23:18:39 +0000
committerNick Mathewson <nickm@torproject.org>2005-02-10 23:18:39 +0000
commit60f234f42b63ed6a5208c70bbc4c32e532cc903d (patch)
treeaaa4aa5ea631dafadb38afd28c3030a4b54f20c7 /src/or/rendservice.c
parentdf41b20e90c5f817b0c8c7ba913cdadea3c671fe (diff)
downloadtor-60f234f42b63ed6a5208c70bbc4c32e532cc903d.tar.gz
tor-60f234f42b63ed6a5208c70bbc4c32e532cc903d.zip
Add more functions to free things to help dmalloc allong.
svn:r3613
Diffstat (limited to 'src/or/rendservice.c')
-rw-r--r--src/or/rendservice.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/or/rendservice.c b/src/or/rendservice.c
index d604cdc6ad..1093760968 100644
--- a/src/or/rendservice.c
+++ b/src/or/rendservice.c
@@ -80,7 +80,7 @@ static void rend_service_free(rend_service_t *service)
/** Release all the storage held in rend_service_list, and allocate a new,
* empty rend_service_list.
*/
-static void rend_service_free_all(void)
+void rend_service_free_all(void)
{
if (!rend_service_list) {
rend_service_list = smartlist_create();
@@ -89,7 +89,7 @@ static void rend_service_free_all(void)
SMARTLIST_FOREACH(rend_service_list, rend_service_t*, ptr,
rend_service_free(ptr));
smartlist_free(rend_service_list);
- rend_service_list = smartlist_create();
+ rend_service_list = NULL;
}
/** Validate <b>service</b> and add it to rend_service_list if possible.
@@ -190,8 +190,10 @@ int rend_config_services(or_options_t *options, int validate_only)
rend_service_t *service = NULL;
rend_service_port_config_t *portcfg;
- if (!validate_only)
+ if (!validate_only) {
rend_service_free_all();
+ rend_service_list = smartlist_create();
+ }
for (line = options->RendConfigLines; line; line = line->next) {
if (!strcasecmp(line->key, "HiddenServiceDir")) {