aboutsummaryrefslogtreecommitdiff
path: root/src/test/test_hs_ob.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2021-07-12 14:59:29 -0400
committerNick Mathewson <nickm@torproject.org>2021-07-12 15:04:43 -0400
commita11a9bb3a0ebdba5c4a283012cc35d5077ee796c (patch)
treeedfab23157e14f226e97d76d9a53ae6e85ea9956 /src/test/test_hs_ob.c
parent1d9de2948b7e40a0044dd1651b0c8cb407a8a2fd (diff)
downloadtor-a11a9bb3a0ebdba5c4a283012cc35d5077ee796c.tar.gz
tor-a11a9bb3a0ebdba5c4a283012cc35d5077ee796c.zip
test_hs_ob: initialize pointers to NULL
This is an attempt to fix CID 1486280, where coverity warns us that, if the tests failed, we might free() an uninitialized pointer.
Diffstat (limited to 'src/test/test_hs_ob.c')
-rw-r--r--src/test/test_hs_ob.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/test/test_hs_ob.c b/src/test/test_hs_ob.c
index 3485655c2e..2f69bf31e0 100644
--- a/src/test/test_hs_ob.c
+++ b/src/test/test_hs_ob.c
@@ -174,6 +174,7 @@ test_get_subcredentials(void *arg)
hs_subcredential_t *subcreds = NULL;
(void) arg;
+ memset(&config, 0, sizeof(config));
MOCK(networkstatus_get_live_consensus,
mock_networkstatus_get_live_consensus);