[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tor/master] test: Fix coverity CID 1439130



commit 064d3e7497216c78b05ccd30422dc522bc337db8
Author: David Goulet <dgoulet@xxxxxxxxxxxxxx>
Date:   Mon Sep 10 10:22:31 2018 -0400

    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@xxxxxxxxxxxxxx>
---
 src/test/test_hs_service.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/src/test/test_hs_service.c b/src/test/test_hs_service.c
index 6a061eaea..bceeafd14 100644
--- a/src/test/test_hs_service.c
+++ b/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();



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits