Skip to content
Snippets Groups Projects
Commit 1ba193b7 authored by George Kadianakis's avatar George Kadianakis
Browse files

Merge branch 'tor-github/pr/1656'

parents 8095c785 bbe90e3e
No related branches found
No related tags found
No related merge requests found
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment