aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/prov/pkcs11/p11_module.cpp
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2017-01-06 12:00:30 -0500
committerJack Lloyd <[email protected]>2017-01-06 12:00:30 -0500
commit13c7c64da3c474504f2e92850111bceefd169029 (patch)
tree36ed8deadb6d6e7c31d8d4488be737fb65a4afab /src/lib/prov/pkcs11/p11_module.cpp
parent8a9583a14724ea6a25100532d1e46c1721a4680c (diff)
Add try/catch blocks in noexcept destructors that might throw
Flagged by Coverity
Diffstat (limited to 'src/lib/prov/pkcs11/p11_module.cpp')
-rw-r--r--src/lib/prov/pkcs11/p11_module.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/lib/prov/pkcs11/p11_module.cpp b/src/lib/prov/pkcs11/p11_module.cpp
index 4ea3dc56d..ba8b659b9 100644
--- a/src/lib/prov/pkcs11/p11_module.cpp
+++ b/src/lib/prov/pkcs11/p11_module.cpp
@@ -20,7 +20,14 @@ Module::Module(const std::string& file_path, C_InitializeArgs init_args)
Module::~Module() BOTAN_NOEXCEPT
{
- m_low_level->C_Finalize(nullptr, nullptr);
+ try
+ {
+ m_low_level->C_Finalize(nullptr, nullptr);
+ }
+ catch(...)
+ {
+ // we are noexcept and must swallow any exception here
+ }
}
void Module::reload(C_InitializeArgs init_args)