aboutsummaryrefslogtreecommitdiff
path: root/src/test/test_hs_descriptor.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2018-06-29 13:06:15 -0400
committerNick Mathewson <nickm@torproject.org>2018-06-29 13:06:15 -0400
commitf6b30a97a96837e012b296a43cc99018d96bcf13 (patch)
treec54975bf9670ab98e42c5f917afc075f72846aa8 /src/test/test_hs_descriptor.c
parent5ab23e03fa0a8bce11798cbf025139e9653b9be4 (diff)
parentf82f8179e65c5e0021da46fd24e4bd7d8126d8f7 (diff)
downloadtor-f6b30a97a96837e012b296a43cc99018d96bcf13.tar.gz
tor-f6b30a97a96837e012b296a43cc99018d96bcf13.zip
Merge branch 'maint-0.3.3' into maint-0.3.4
Diffstat (limited to 'src/test/test_hs_descriptor.c')
-rw-r--r--src/test/test_hs_descriptor.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/test/test_hs_descriptor.c b/src/test/test_hs_descriptor.c
index 988f77f2fa..b84941a965 100644
--- a/src/test/test_hs_descriptor.c
+++ b/src/test/test_hs_descriptor.c
@@ -176,6 +176,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;
@@ -185,9 +188,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");
@@ -214,9 +215,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::]");
@@ -246,9 +245,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));
@@ -274,6 +271,8 @@ test_link_specifier(void *arg)
}
done:
+ link_specifier_free(ls);
+ tor_free(b64);
smartlist_free(link_specifiers);
}