diff options
author | Nick Mathewson <nickm@torproject.org> | 2019-10-22 12:11:50 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2019-10-22 12:11:50 -0400 |
commit | d4dde249a04c768381767f67a1a82425bc70baaa (patch) | |
tree | 96c3d994bbb6d20f25c740ce61c3d3d5a5212495 /src/feature/relay/router.c | |
parent | 6965798a160e7caa07899216f35deeee9d6641ed (diff) | |
parent | d1eab05834566f998721d3a16107767885711c57 (diff) | |
download | tor-d4dde249a04c768381767f67a1a82425bc70baaa.tar.gz tor-d4dde249a04c768381767f67a1a82425bc70baaa.zip |
Merge remote-tracking branch 'tor-github/pr/1346' into maint-0.4.1
Diffstat (limited to 'src/feature/relay/router.c')
-rw-r--r-- | src/feature/relay/router.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/feature/relay/router.c b/src/feature/relay/router.c index 25bb1835c2..a838b5b489 100644 --- a/src/feature/relay/router.c +++ b/src/feature/relay/router.c @@ -3355,6 +3355,10 @@ router_free_all(void) crypto_pk_free(server_identitykey); crypto_pk_free(client_identitykey); + /* Destroying a locked mutex is undefined behaviour. This mutex may be + * locked, because multiple threads can access it. But we need to destroy + * it, otherwise re-initialisation will trigger undefined behaviour. + * See #31735 for details. */ tor_mutex_free(key_lock); routerinfo_free(desc_routerinfo); extrainfo_free(desc_extrainfo); |