aboutsummaryrefslogtreecommitdiff
path: root/contrib/epee/src/mlocker.cpp
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2018-11-22 01:39:12 +0000
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2018-11-22 01:43:42 +0000
commit40485a73b6fce47324aecf8b182164f72be0ae76 (patch)
treebadc2cf7c51d9007f8bc3dbf055124304140101f /contrib/epee/src/mlocker.cpp
parentMerge pull request #4781 (diff)
downloadmonero-40485a73b6fce47324aecf8b182164f72be0ae76.tar.xz
mlocker: fix access to global lock map after dtor on exit
as the lock, it now leaks
Diffstat (limited to '')
-rw-r--r--contrib/epee/src/mlocker.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/contrib/epee/src/mlocker.cpp b/contrib/epee/src/mlocker.cpp
index c3262e8f4..b35393081 100644
--- a/contrib/epee/src/mlocker.cpp
+++ b/contrib/epee/src/mlocker.cpp
@@ -89,8 +89,8 @@ namespace epee
}
std::map<size_t, unsigned int> &mlocker::map()
{
- static std::map<size_t, unsigned int> vmap;
- return vmap;
+ static std::map<size_t, unsigned int> *vmap = new std::map<size_t, unsigned int>();
+ return *vmap;
}
size_t mlocker::get_page_size()