Explorar o código

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

Nick Mathewson %!s(int64=7) %!d(string=hai) anos
pai
achega
ce3d501040
Modificáronse 1 ficheiros con 3 adicións e 0 borrados
  1. 3 0
      src/test/test_hs_service.c

+ 3 - 0
src/test/test_hs_service.c

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