summaryrefslogtreecommitdiff
path: root/src/or/networkstatus.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/or/networkstatus.c')
-rw-r--r--src/or/networkstatus.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/or/networkstatus.c b/src/or/networkstatus.c
index f78d9d672b..fa8d0bcf13 100644
--- a/src/or/networkstatus.c
+++ b/src/or/networkstatus.c
@@ -2642,6 +2642,25 @@ networkstatus_check_required_protocols(const networkstatus_t *ns,
return 0;
}
+/** Release all storage held in <b>s</b>. */
+void
+ns_detached_signatures_free_(ns_detached_signatures_t *s)
+{
+ if (!s)
+ return;
+ if (s->signatures) {
+ STRMAP_FOREACH(s->signatures, flavor, smartlist_t *, sigs) {
+ SMARTLIST_FOREACH(sigs, document_signature_t *, sig,
+ document_signature_free(sig));
+ smartlist_free(sigs);
+ } STRMAP_FOREACH_END;
+ strmap_free(s->signatures, NULL);
+ strmap_free(s->digests, tor_free_);
+ }
+
+ tor_free(s);
+}
+
/** Free all storage held locally in this module. */
void
networkstatus_free_all(void)