aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2017-08-24 16:23:57 -0400
committerNick Mathewson <nickm@torproject.org>2017-08-24 16:23:57 -0400
commitf9cd870f50d770f629e370583b0e9df2f8844436 (patch)
tree2fecfd062ed99c8e7db3f7326c5d99e1ecde0766
parentcbfc50d485c65a5e4711f64d3a4cf395030246c9 (diff)
parentdfaa5c65f9fbfde9a12d8eb3ed848cab6ed1a5f9 (diff)
downloadtor-f9cd870f50d770f629e370583b0e9df2f8844436.tar.gz
tor-f9cd870f50d770f629e370583b0e9df2f8844436.zip
Merge remote-tracking branch 'dgoulet/bug23319_032_01'
-rw-r--r--src/or/hs_descriptor.c2
-rw-r--r--src/or/hs_descriptor.h2
-rw-r--r--src/test/test_hs_descriptor.c3
3 files changed, 5 insertions, 2 deletions
diff --git a/src/or/hs_descriptor.c b/src/or/hs_descriptor.c
index f50e2f8510..4bc54bdb2d 100644
--- a/src/or/hs_descriptor.c
+++ b/src/or/hs_descriptor.c
@@ -147,7 +147,7 @@ static token_rule_t hs_desc_intro_point_v3_token_table[] = {
};
/* Free the content of the plaintext section of a descriptor. */
-static void
+STATIC void
desc_plaintext_data_free_contents(hs_desc_plaintext_data_t *desc)
{
if (!desc) {
diff --git a/src/or/hs_descriptor.h b/src/or/hs_descriptor.h
index ce225d5217..3e82746c35 100644
--- a/src/or/hs_descriptor.h
+++ b/src/or/hs_descriptor.h
@@ -256,6 +256,8 @@ STATIC int desc_sig_is_valid(const char *b64_sig,
const char *encoded_desc, size_t encoded_len);
STATIC size_t decode_superencrypted(const char *message, size_t message_len,
uint8_t **encrypted_out);
+STATIC void desc_plaintext_data_free_contents(hs_desc_plaintext_data_t *desc);
+
#endif /* HS_DESCRIPTOR_PRIVATE */
#endif /* TOR_HS_DESCRIPTOR_H */
diff --git a/src/test/test_hs_descriptor.c b/src/test/test_hs_descriptor.c
index 30a5b23cf2..7f0d1dd189 100644
--- a/src/test/test_hs_descriptor.c
+++ b/src/test/test_hs_descriptor.c
@@ -581,7 +581,8 @@ test_decode_bad_signature(void *arg)
expect_log_msg_containing("Malformed signature line. Rejecting.");
teardown_capture_of_logs();
- done: ;
+ done:
+ desc_plaintext_data_free_contents(&desc_plaintext);
}
static void