Fix null-pointer-deref warning from scan-build in test_hs_service.c

This commit is contained in:
Nick Mathewson 2018-12-17 09:28:24 -05:00
parent d58a597a55
commit ce3d501040

View File

@ -1654,6 +1654,9 @@ test_build_descriptors(void *arg)
service->desc_current = NULL; service->desc_current = NULL;
build_all_descriptors(now); build_all_descriptors(now);
tt_assert(service->desc_current);
tt_assert(service->desc_current->desc);
hs_desc_superencrypted_data_t *superencrypted; hs_desc_superencrypted_data_t *superencrypted;
superencrypted = &service->desc_current->desc->superencrypted_data; superencrypted = &service->desc_current->desc->superencrypted_data;
tt_int_op(smartlist_len(superencrypted->clients), OP_EQ, 16); tt_int_op(smartlist_len(superencrypted->clients), OP_EQ, 16);