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.
This commit is contained in:
Nick Mathewson
2021-07-12 14:59:29 -04:00
parent 1d9de2948b
commit a11a9bb3a0
+1
View File
@@ -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);