[tor-commits] [tor/master] asan does not like TO_CONN(NULL)
nickm at torproject.org
nickm at torproject.org
Mon Feb 22 20:45:40 UTC 2016
commit ef42c00cf0b3a10673a80dd8cf98c683fb68a33e
Author: Nick Mathewson <nickm at torproject.org>
Date: Mon Feb 22 15:45:37 2016 -0500
asan does not like TO_CONN(NULL)
---
changes/test_asan | 3 +++
src/test/test_dir_handle_get.c | 4 ----
2 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/changes/test_asan b/changes/test_asan
new file mode 100644
index 0000000..ce0aa97
--- /dev/null
+++ b/changes/test_asan
@@ -0,0 +1,3 @@
+ o Testing:
+ - Fix several warnings from clang's address sanitizer produced in the
+ unit tests.
diff --git a/src/test/test_dir_handle_get.c b/src/test/test_dir_handle_get.c
index e1ac50e..c81ed7b 100644
--- a/src/test/test_dir_handle_get.c
+++ b/src/test/test_dir_handle_get.c
@@ -2255,7 +2255,6 @@ status_vote_next_consensus_signatures_test(char **header, char **body,
static void
test_dir_handle_get_status_vote_next_consensus_signatures_not_found(void* data)
{
- dir_connection_t *conn = NULL;
char *header = NULL, *body = NULL;
size_t body_used;
(void) data;
@@ -2266,7 +2265,6 @@ test_dir_handle_get_status_vote_next_consensus_signatures_not_found(void* data)
tt_str_op(NOT_FOUND, OP_EQ, header);
done:
- connection_free_(TO_CONN(conn));
tor_free(header);
tor_free(body);
}
@@ -2308,7 +2306,6 @@ test_dir_handle_get_status_vote_next_consensus_signatures(void* data)
static void
test_dir_handle_get_status_vote_next_consensus_signatures_busy(void* data)
{
- dir_connection_t *conn = NULL;
char *header = NULL, *body = NULL;
size_t body_used;
(void) data;
@@ -2328,7 +2325,6 @@ test_dir_handle_get_status_vote_next_consensus_signatures_busy(void* data)
done:
UNMOCK(get_options);
NS_UNMOCK(dirvote_get_pending_detached_signatures);
- connection_free_(TO_CONN(conn));
tor_free(header);
tor_free(body);
or_options_free(mock_options); mock_options = NULL;
More information about the tor-commits
mailing list