diff options
author | Nick Mathewson <nickm@torproject.org> | 2018-06-29 13:06:15 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2018-06-29 13:06:15 -0400 |
commit | 68dfbd5ef433b830059baa08d48589518db05d22 (patch) | |
tree | ba5a3ed16dd63a65e8c409b435c112669b0a9900 /src/test/test_hs_descriptor.c | |
parent | fe2588a5a8560c8cb03345b3caaaf906655c34a1 (diff) | |
parent | ea14d3408df7c846722b54484cf5b8d61de5384f (diff) | |
download | tor-68dfbd5ef433b830059baa08d48589518db05d22.tar.gz tor-68dfbd5ef433b830059baa08d48589518db05d22.zip |
Merge branch 'maint-0.3.1' into maint-0.3.2
Diffstat (limited to 'src/test/test_hs_descriptor.c')
-rw-r--r-- | src/test/test_hs_descriptor.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/test/test_hs_descriptor.c b/src/test/test_hs_descriptor.c index 9ec183db06..a5e9b96673 100644 --- a/src/test/test_hs_descriptor.c +++ b/src/test/test_hs_descriptor.c @@ -174,6 +174,9 @@ test_link_specifier(void *arg) ssize_t ret; hs_desc_link_specifier_t spec; smartlist_t *link_specifiers = smartlist_new(); + char buf[256]; + char *b64 = NULL; + link_specifier_t *ls = NULL; (void) arg; @@ -183,9 +186,7 @@ test_link_specifier(void *arg) /* Test IPv4 for starter. */ { - char *b64, buf[256]; uint32_t ipv4; - link_specifier_t *ls; spec.type = LS_IPV4; ret = tor_addr_parse(&spec.u.ap.addr, "1.2.3.4"); @@ -212,9 +213,7 @@ test_link_specifier(void *arg) /* Test IPv6. */ { - char *b64, buf[256]; uint8_t ipv6[16]; - link_specifier_t *ls; spec.type = LS_IPV6; ret = tor_addr_parse(&spec.u.ap.addr, "[1:2:3:4::]"); @@ -244,9 +243,7 @@ test_link_specifier(void *arg) /* Test legacy. */ { - char *b64, buf[256]; uint8_t *id; - link_specifier_t *ls; spec.type = LS_LEGACY_ID; memset(spec.u.legacy_id, 'Y', sizeof(spec.u.legacy_id)); @@ -272,6 +269,8 @@ test_link_specifier(void *arg) } done: + link_specifier_free(ls); + tor_free(b64); smartlist_free(link_specifiers); } |