diff options
Diffstat (limited to 'src/or/hs_intropoint.c')
-rw-r--r-- | src/or/hs_intropoint.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/or/hs_intropoint.c b/src/or/hs_intropoint.c index 2abbfcd6c3..25c43b3ad3 100644 --- a/src/or/hs_intropoint.c +++ b/src/or/hs_intropoint.c @@ -24,6 +24,7 @@ #include "hs/cell_introduce1.h" #include "hs_circuitmap.h" +#include "hs_descriptor.h" #include "hs_intropoint.h" #include "hs_common.h" @@ -594,3 +595,16 @@ hs_intro_received_introduce1(or_circuit_t *circ, const uint8_t *request, return -1; } +/* Free the given intropoint object ip. */ +void +hs_intro_free_content(hs_intropoint_t *ip) +{ + if (ip == NULL) { + return; + } + tor_cert_free(ip->auth_key_cert); + SMARTLIST_FOREACH(ip->link_specifiers, hs_desc_link_specifier_t *, ls, + hs_desc_link_specifier_free(ls)); + smartlist_free(ip->link_specifiers); +} + |