[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [tor/master] hs: Remove pointless NULL check found by Coverity
commit c82881a235a686b84ad78d076826f832e3363184
Author: David Goulet <dgoulet@xxxxxxxxxxxxxx>
Date: Thu Nov 10 12:32:18 2016 -0500
hs: Remove pointless NULL check found by Coverity
Signed-off-by: David Goulet <dgoulet@xxxxxxxxxxxxxx>
---
src/or/hs_descriptor.c | 13 ++++---------
1 file changed, 4 insertions(+), 9 deletions(-)
diff --git a/src/or/hs_descriptor.c b/src/or/hs_descriptor.c
index 1517ccb..d381732 100644
--- a/src/or/hs_descriptor.c
+++ b/src/or/hs_descriptor.c
@@ -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
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits