Browse Source

test: Fix coverity CID 1439130

Trivial fix of removing an uneeded NULL check in an HS v3 unit test.

Signed-off-by: David Goulet <dgoulet@torproject.org>
David Goulet 5 years ago
parent
commit
064d3e7497
1 changed files with 1 additions and 3 deletions
  1. 1 3
      src/test/test_hs_service.c

+ 1 - 3
src/test/test_hs_service.c

@@ -563,9 +563,7 @@ test_load_keys_with_client_auth(void *arg)
   } SMARTLIST_FOREACH_END(pubkey_b32);
 
  done:
-  if (pubkey_b32_list) {
-    SMARTLIST_FOREACH(pubkey_b32_list, char *, s, tor_free(s));
-  }
+  SMARTLIST_FOREACH(pubkey_b32_list, char *, s, tor_free(s));
   smartlist_free(pubkey_b32_list);
   tor_free(hsdir_v3);
   hs_free_all();