]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
test: Fix coverity CID 1439130
authorDavid Goulet <dgoulet@torproject.org>
Mon, 10 Sep 2018 14:22:31 +0000 (10:22 -0400)
committerDavid Goulet <dgoulet@torproject.org>
Mon, 10 Sep 2018 14:22:31 +0000 (10:22 -0400)
Trivial fix of removing an uneeded NULL check in an HS v3 unit test.

Signed-off-by: David Goulet <dgoulet@torproject.org>
src/test/test_hs_service.c

index 6a061eaea4c2fb5e6e41fdcc73b8a58da097a287..bceeafd149d32b43f5ec47915f3c0a2bb8491f69 100644 (file)
@@ -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();