diff options
author | Nick Mathewson <nickm@torproject.org> | 2018-06-29 13:06:11 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2018-06-29 13:06:11 -0400 |
commit | b89a66e9975dec4531c5443744f19b8105b4086a (patch) | |
tree | cc06acdd2a5e588f49f4859bfac658c7027435f7 | |
parent | 419077c26da1e50ed5671c69ec446a3eb60a8303 (diff) | |
parent | c997d49ad6e6a360323311444eed1dbee785aea4 (diff) | |
download | tor-b89a66e9975dec4531c5443744f19b8105b4086a.tar.gz tor-b89a66e9975dec4531c5443744f19b8105b4086a.zip |
Merge remote-tracking branch 'ahf-github/maint-0.3.0' into maint-0.3.1
-rw-r--r-- | src/or/hs_descriptor.c | 1 | ||||
-rw-r--r-- | src/test/test_hs_descriptor.c | 11 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/or/hs_descriptor.c b/src/or/hs_descriptor.c index 3ec02618bf..8e10c0fff8 100644 --- a/src/or/hs_descriptor.c +++ b/src/or/hs_descriptor.c @@ -1134,6 +1134,7 @@ decode_link_specifiers(const char *encoded) sizeof(hs_spec->u.legacy_id)); break; default: + tor_free(hs_spec); goto err; } diff --git a/src/test/test_hs_descriptor.c b/src/test/test_hs_descriptor.c index 7d7ec7d9db..45850ada4e 100644 --- a/src/test/test_hs_descriptor.c +++ b/src/test/test_hs_descriptor.c @@ -173,6 +173,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; @@ -182,9 +185,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"); @@ -211,9 +212,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::]"); @@ -242,9 +241,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)); @@ -270,6 +267,8 @@ test_link_specifier(void *arg) } done: + link_specifier_free(ls); + tor_free(b64); smartlist_free(link_specifiers); } |