Skip to content
Snippets Groups Projects
Commit 09dbcf3b authored by Nick Mathewson's avatar Nick Mathewson :game_die:
Browse files

Fix to 9841 fix: setting a token to NULL should clear it

Found by testing with chutney.  The old behavior was "fail an
assertion", which obviously isn't optimal.

Bugfix on 8b9a2cb6; bug not in any
released version.
parent 8b9a2cb6
No related branches found
No related tags found
No related merge requests found
......@@ -1233,6 +1233,11 @@ circuit_set_rend_token(or_circuit_t *circ, int is_rend_circ,
if (circ->rendinfo)
circuit_clear_rend_token(circ);
if (token == NULL) {
/* We were only trying to remove this token, not set a new one. */
return;
}
found_circ = digestmap_get(map, (const char *)token);
if (found_circ) {
tor_assert(found_circ != circ);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment