summaryrefslogtreecommitdiff
path: root/lib/lsan/lsan_common.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/lsan/lsan_common.cpp')
-rw-r--r--lib/lsan/lsan_common.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/lib/lsan/lsan_common.cpp b/lib/lsan/lsan_common.cpp
index 86bd120e7..9ff9f4c5d 100644
--- a/lib/lsan/lsan_common.cpp
+++ b/lib/lsan/lsan_common.cpp
@@ -570,11 +570,7 @@ static bool CheckForLeaks() {
EnsureMainThreadIDIsCorrect();
CheckForLeaksParam param;
param.success = false;
- LockThreadRegistry();
- LockAllocator();
- DoStopTheWorld(CheckForLeaksCallback, &param);
- UnlockAllocator();
- UnlockThreadRegistry();
+ LockStuffAndStopTheWorld(CheckForLeaksCallback, &param);
if (!param.success) {
Report("LeakSanitizer has encountered a fatal error.\n");