From 3ab545d7f8e979e2cabeff6f5f6f1afe94a5c195 Mon Sep 17 00:00:00 2001 From: practicalswift Date: Tue, 31 Oct 2017 10:25:09 +0100 Subject: [PATCH] addrman: Add missing lock in Clear() (CAddrMan) The variable vRandom is guarded by the mutex cs. --- src/addrman.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/addrman.h b/src/addrman.h index 18f306228..f347cba6c 100644 --- a/src/addrman.h +++ b/src/addrman.h @@ -455,6 +455,7 @@ public: void Clear() { + LOCK(cs); std::vector().swap(vRandom); nKey = GetRandHash(); for (size_t bucket = 0; bucket < ADDRMAN_NEW_BUCKET_COUNT; bucket++) {