From 2b3595d0fe056ec4245ad3177d56c1e92da1ff9e Mon Sep 17 00:00:00 2001 From: moneromooo-monero Date: Thu, 15 Nov 2018 13:51:54 +0000 Subject: various: do not propagate exception through dtor Coverity 189689, 189690, 189692, 189695 --- contrib/epee/include/mlocker.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'contrib/epee/include') 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 &&mt): T(mt) { mlocker::lock(this, sizeof(T)); } mlocked &operator=(const mlocked &mt) { T::operator=(mt); return *this; } - ~mlocked() { mlocker::unlock(this, sizeof(T)); } + ~mlocked() { try { mlocker::unlock(this, sizeof(T)); } catch (...) { /* do not propagate */ } } }; template -- cgit v1.2.3