summaryrefslogtreecommitdiff
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 14:59:29 -0400
commit1d9de2948b7e40a0044dd1651b0c8cb407a8a2fd (patch)
tree107d288b9b20f8a9eaa3149451de36be4e26ab17
parent9b2d179d9537b2f3e3275d22f014cf7385349553 (diff)
downloadtor-1d9de2948b7e40a0044dd1651b0c8cb407a8a2fd.tar.gz
tor-1d9de2948b7e40a0044dd1651b0c8cb407a8a2fd.zip
test_hs_control: initialize pointers to NULL
This is an attempt to fix CID 1486276, where coverity warns us that, if the tests failed, we might free() an uninitialized pointer.
-rw-r--r--src/test/test_hs_control.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/test/test_hs_control.c b/src/test/test_hs_control.c
index b036c5eada..c32803b380 100644
--- a/src/test/test_hs_control.c
+++ b/src/test/test_hs_control.c
@@ -798,7 +798,7 @@ test_hs_control_add_onion_helper_add_service(void *arg)
hs_service_ht *global_map;
hs_port_config_t *portcfg;
smartlist_t *portcfgs;
- char *address_out_good, *address_out_bad;
+ char *address_out_good = NULL, *address_out_bad = NULL;
hs_service_t *service_good = NULL;
hs_service_t *service_bad = NULL;