diff options
author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2018-11-22 01:39:12 +0000 |
---|---|---|
committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2018-11-22 01:43:42 +0000 |
commit | 40485a73b6fce47324aecf8b182164f72be0ae76 (patch) | |
tree | badc2cf7c51d9007f8bc3dbf055124304140101f /contrib | |
parent | Merge pull request #4781 (diff) | |
download | monero-40485a73b6fce47324aecf8b182164f72be0ae76.tar.xz |
mlocker: fix access to global lock map after dtor on exit
as the lock, it now leaks
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/epee/src/mlocker.cpp | 4 |
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() |