aboutsummaryrefslogtreecommitdiff
path: root/src/or
diff options
context:
space:
mode:
authorDavid Goulet <dgoulet@torproject.org>2016-11-10 12:32:18 -0500
committerDavid Goulet <dgoulet@torproject.org>2016-11-10 12:32:18 -0500
commitc82881a235a686b84ad78d076826f832e3363184 (patch)
tree217b31d6ed057175ae2da0c4cd36181035d2bc22 /src/or
parent0980787f91cfc420f02dead3fea99882ab8c2ada (diff)
downloadtor-c82881a235a686b84ad78d076826f832e3363184.tar.gz
tor-c82881a235a686b84ad78d076826f832e3363184.zip
hs: Remove pointless NULL check found by Coverity
Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat (limited to 'src/or')
-rw-r--r--src/or/hs_descriptor.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/src/or/hs_descriptor.c b/src/or/hs_descriptor.c
index 1517ccb12e..d381732eff 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