From a11a9bb3a0ebdba5c4a283012cc35d5077ee796c Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Mon, 12 Jul 2021 14:59:29 -0400 Subject: 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. --- src/test/test_hs_ob.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src') 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); -- cgit v1.2.3-54-g00ecf