aboutsummaryrefslogtreecommitdiff
path: root/src/or/hs_service.c
diff options
context:
space:
mode:
authorGeorge Kadianakis <desnacked@riseup.net>2017-08-09 13:45:37 +0300
committerGeorge Kadianakis <desnacked@riseup.net>2017-08-09 13:49:12 +0300
commit21e5146529e4040c7391f3696baa5e6b4370d06d (patch)
treea493f4aa105775f9e7b94954f7b9a2844d562337 /src/or/hs_service.c
parent8e84968ffbf6d284e8a877ddcde6ded40b3f5681 (diff)
downloadtor-21e5146529e4040c7391f3696baa5e6b4370d06d.tar.gz
tor-21e5146529e4040c7391f3696baa5e6b4370d06d.zip
prop224: Fix coverity warnings from #20657 merge.
- Fix various ssize_t/size_t confusions in the tests. - Fix a weird memset argument: "bad_memset: Argument -16 in memset loses precision in memset(&desc_two->blinded_kp.pubkey.pubkey, -16, 32UL)." - Fix check_after_deref instance in check_state_line_for_service_rev_counter(): "check_after_deref: Null-checking items suggests that it may be null, but it has already been dereferenced on all paths leading to the check."
Diffstat (limited to 'src/or/hs_service.c')
-rw-r--r--src/or/hs_service.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/or/hs_service.c b/src/or/hs_service.c
index 5f36964547..cb3a49cb8a 100644
--- a/src/or/hs_service.c
+++ b/src/or/hs_service.c
@@ -2111,10 +2111,9 @@ check_state_line_for_service_rev_counter(const char *state_line,
b64_key_str, rev_counter);
done:
- if (items) {
- SMARTLIST_FOREACH(items, char*, s, tor_free(s));
- smartlist_free(items);
- }
+ tor_assert(items);
+ SMARTLIST_FOREACH(items, char*, s, tor_free(s));
+ smartlist_free(items);
return rev_counter;
}