Skip to content

Commit

Permalink
Merge branch 'tor-github/pr/1656'
Browse files Browse the repository at this point in the history
  • Loading branch information
asn-d6 committed Jan 14, 2020
2 parents 8095c78 + bbe90e3 commit 1ba193b
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/feature/rend/rendcache.c
Original file line number Diff line number Diff line change
Expand Up @@ -526,9 +526,16 @@ rend_cache_lookup_entry(const char *query, int version, rend_cache_entry_t **e)
rend_cache_entry_t *entry = NULL;
static const int default_version = 2;

tor_assert(rend_cache);
tor_assert(query);

/* This is possible if we are in the shutdown process and the cache was
* freed while some other subsystem might do a lookup to the cache for
* cleanup reasons such HS circuit cleanup for instance. */
if (!rend_cache) {
ret = -ENOENT;
goto end;
}

if (!rend_valid_v2_service_id(query)) {
ret = -EINVAL;
goto end;
Expand Down

0 comments on commit 1ba193b

Please sign in to comment.