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/app/config/config.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/app/config/config.c')
-rw-r--r-- | src/app/config/config.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/app/config/config.c b/src/app/config/config.c index a061871748..8ccbac159a 100644 --- a/src/app/config/config.c +++ b/src/app/config/config.c @@ -1163,7 +1163,11 @@ init_protocol_warning_severity_level(void) static void cleanup_protocol_warning_severity_level(void) { - atomic_counter_destroy(&protocol_warning_severity_level); + /* 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. */ + atomic_counter_destroy(&protocol_warning_severity_level); } /** List of default directory authorities */ |