aboutsummaryrefslogtreecommitdiff
path: root/contrib/epee/src/mlocker.cpp
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2018-12-04 17:07:51 +0200
committerRiccardo Spagni <ric@spagni.net>2018-12-04 17:07:51 +0200
commit398f7076bb67d749d76a1b275e5bd771e9714b4b (patch)
tree792b06ae57ec00c1b5d704655a7d81cf7fbe7064 /contrib/epee/src/mlocker.cpp
parentMerge pull request #4850 (diff)
parentvarious: do not propagate exception through dtor (diff)
downloadmonero-398f7076bb67d749d76a1b275e5bd771e9714b4b.tar.xz
Merge pull request #4853
2b3595d0 various: do not propagate exception through dtor (moneromooo-monero)
Diffstat (limited to 'contrib/epee/src/mlocker.cpp')
-rw-r--r--contrib/epee/src/mlocker.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/contrib/epee/src/mlocker.cpp b/contrib/epee/src/mlocker.cpp
index c3262e8f4..09ef861ac 100644
--- a/contrib/epee/src/mlocker.cpp
+++ b/contrib/epee/src/mlocker.cpp
@@ -108,7 +108,8 @@ namespace epee
mlocker::~mlocker()
{
- unlock(ptr, len);
+ try { unlock(ptr, len); }
+ catch (...) { /* ignore and do not propagate through the dtor */ }
}
void mlocker::lock(void *ptr, size_t len)