]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
hs: Remove pointless NULL check found by Coverity
authorDavid Goulet <dgoulet@torproject.org>
Thu, 10 Nov 2016 17:32:18 +0000 (12:32 -0500)
committerDavid Goulet <dgoulet@torproject.org>
Thu, 10 Nov 2016 17:32:18 +0000 (12:32 -0500)
Signed-off-by: David Goulet <dgoulet@torproject.org>
src/or/hs_descriptor.c

index 1517ccb12e8f3f2804a3f60f57a15f8f510c35a9..d381732effb796a93728aff09dcd6a1141a534f2 100644 (file)
@@ -1394,15 +1394,10 @@ decode_intro_points(const hs_descriptor_t *desc,
   retval = 0;
 
  err:
-  if (chunked_desc) {
-    SMARTLIST_FOREACH(chunked_desc, char *, a, tor_free(a));
-    smartlist_free(chunked_desc);
-  }
-  if (intro_points) {
-    SMARTLIST_FOREACH(intro_points, char *, a, tor_free(a));
-    smartlist_free(intro_points);
-  }
-
+  SMARTLIST_FOREACH(chunked_desc, char *, a, tor_free(a));
+  smartlist_free(chunked_desc);
+  SMARTLIST_FOREACH(intro_points, char *, a, tor_free(a));
+  smartlist_free(intro_points);
   return retval;
 }
 /* Return 1 iff the given base64 encoded signature in b64_sig from the encoded