Fix a couple of memory leaks in rend_add_service spotted by coverity

This commit is contained in:
Nick Mathewson
2011-11-17 17:14:49 -05:00
parent 95163ec072
commit 6a6233b70b
+2 -2
View File
@@ -174,7 +174,7 @@ rend_add_service(rend_service_t *service)
smartlist_len(service->clients) == 0) {
log_warn(LD_CONFIG, "Hidden service (%s) with client authorization but no "
"clients; ignoring.",
esc_for_log(service->directory));
escaped(service->directory));
rend_service_free(service);
return;
}
@@ -182,7 +182,7 @@ rend_add_service(rend_service_t *service)
if (!smartlist_len(service->ports)) {
log_warn(LD_CONFIG, "Hidden service (%s) with no ports configured; "
"ignoring.",
esc_for_log(service->directory));
escaped(service->directory));
rend_service_free(service);
} else {
int dupe = 0;