diff options
author | Jack Lloyd <[email protected]> | 2017-01-06 12:00:30 -0500 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2017-01-06 12:00:30 -0500 |
commit | 13c7c64da3c474504f2e92850111bceefd169029 (patch) | |
tree | 36ed8deadb6d6e7c31d8d4488be737fb65a4afab /src/lib/prov/pkcs11/p11_object.cpp | |
parent | 8a9583a14724ea6a25100532d1e46c1721a4680c (diff) |
Add try/catch blocks in noexcept destructors that might throw
Flagged by Coverity
Diffstat (limited to 'src/lib/prov/pkcs11/p11_object.cpp')
-rw-r--r-- | src/lib/prov/pkcs11/p11_object.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/lib/prov/pkcs11/p11_object.cpp b/src/lib/prov/pkcs11/p11_object.cpp index 872fdf8b7..5f078fd31 100644 --- a/src/lib/prov/pkcs11/p11_object.cpp +++ b/src/lib/prov/pkcs11/p11_object.cpp @@ -92,9 +92,16 @@ ObjectFinder::ObjectFinder(Session& session, const std::vector<Attribute>& searc ObjectFinder::~ObjectFinder() BOTAN_NOEXCEPT { - if(m_search_terminated == false) + try { - module()->C_FindObjectsFinal(m_session.get().handle(), nullptr); + if(m_search_terminated == false) + { + module()->C_FindObjectsFinal(m_session.get().handle(), nullptr); + } + } + catch(...) + { + // ignore error during noexcept function } } |