aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPieter Wuille <pieter.wuille@gmail.com>2016-04-21 13:54:19 +0200
committerPieter Wuille <pieter.wuille@gmail.com>2016-04-21 13:57:07 +0200
commitbafd075c5e6a1088ef0f1aa0b0b224e026a3d3e0 (patch)
tree053e96eac1cbbafb493b53af8fa3cae2d2467974 /src
parent7daa3adb242d9c8728fdb15c6af6596aaad5502f (diff)
parent220f950ab1302f8f8c0bb5b9c818f3d6569796bd (diff)
downloadbitcoin-bafd075c5e6a1088ef0f1aa0b0b224e026a3d3e0.tar.xz
Merge #7913: Fix for incorrect locking in GetPubKey() (keystore.cpp)
220f950 Fix for incorrect locking in GetPubKey() (keystore.cpp) (Yuri Zhykin)
Diffstat (limited to 'src')
-rw-r--r--src/keystore.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/keystore.cpp b/src/keystore.cpp
index cc8a573367..d568a74350 100644
--- a/src/keystore.cpp
+++ b/src/keystore.cpp
@@ -19,6 +19,7 @@ bool CBasicKeyStore::GetPubKey(const CKeyID &address, CPubKey &vchPubKeyOut) con
{
CKey key;
if (!GetKey(address, key)) {
+ LOCK(cs_KeyStore);
WatchKeyMap::const_iterator it = mapWatchKeys.find(address);
if (it != mapWatchKeys.end()) {
vchPubKeyOut = it->second;