aboutsummaryrefslogtreecommitdiff
path: root/src/wallet
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 /src/wallet
parentMerge pull request #4842 (diff)
downloadmonero-2b3595d0fe056ec4245ad3177d56c1e92da1ff9e.tar.xz
various: do not propagate exception through dtor
Coverity 189689, 189690, 189692, 189695
Diffstat (limited to 'src/wallet')
-rw-r--r--src/wallet/wallet2.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp
index 6f919d12c..0eda7f52d 100644
--- a/src/wallet/wallet2.cpp
+++ b/src/wallet/wallet2.cpp
@@ -815,7 +815,12 @@ wallet_keys_unlocker::~wallet_keys_unlocker()
{
if (!locked)
return;
- w.encrypt_keys(key);
+ try { w.encrypt_keys(key); }
+ catch (...)
+ {
+ MERROR("Failed to re-encrypt wallet keys");
+ // do not propagate through dtor, we'd crash
+ }
}
wallet2::wallet2(network_type nettype, uint64_t kdf_rounds, bool unattended):