aboutsummaryrefslogtreecommitdiff
path: root/contrib/epee/include/mlocker.h
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2018-11-15 13:51:54 +0000
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2018-11-15 15:53:21 +0000
commit2b3595d0fe056ec4245ad3177d56c1e92da1ff9e (patch)
treeb889e5f02780a6bf547cab83f7d6952f05313665 /contrib/epee/include/mlocker.h
parentMerge pull request #4842 (diff)
downloadmonero-2b3595d0fe056ec4245ad3177d56c1e92da1ff9e.tar.xz
various: do not propagate exception through dtor
Coverity 189689, 189690, 189692, 189695
Diffstat (limited to 'contrib/epee/include/mlocker.h')
-rw-r--r--contrib/epee/include/mlocker.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/contrib/epee/include/mlocker.h b/contrib/epee/include/mlocker.h
index d2fc2ed58..a6d94b3d2 100644
--- a/contrib/epee/include/mlocker.h
+++ b/contrib/epee/include/mlocker.h
@@ -73,7 +73,7 @@ namespace epee
mlocked(const T &&t): T(t) { mlocker::lock(this, sizeof(T)); }
mlocked(const mlocked<T> &&mt): T(mt) { mlocker::lock(this, sizeof(T)); }
mlocked<T> &operator=(const mlocked<T> &mt) { T::operator=(mt); return *this; }
- ~mlocked() { mlocker::unlock(this, sizeof(T)); }
+ ~mlocked() { try { mlocker::unlock(this, sizeof(T)); } catch (...) { /* do not propagate */ } }
};
template<typename T>