mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-07-01 09:57:05 -04:00
parent
010d44eab7
commit
0f1be60bda
1 changed files with 4 additions and 0 deletions
|
@ -77,6 +77,7 @@ bool YubiKey::init()
|
||||||
// TODO: handle multiple attached hardware devices
|
// TODO: handle multiple attached hardware devices
|
||||||
m_yk_void = static_cast<void*>(yk_open_first_key());
|
m_yk_void = static_cast<void*>(yk_open_first_key());
|
||||||
if (m_yk == nullptr) {
|
if (m_yk == nullptr) {
|
||||||
|
yk_release();
|
||||||
m_mutex.unlock();
|
m_mutex.unlock();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -85,6 +86,7 @@ bool YubiKey::init()
|
||||||
if (m_ykds == nullptr) {
|
if (m_ykds == nullptr) {
|
||||||
yk_close_key(m_yk);
|
yk_close_key(m_yk);
|
||||||
m_yk_void = nullptr;
|
m_yk_void = nullptr;
|
||||||
|
yk_release();
|
||||||
m_mutex.unlock();
|
m_mutex.unlock();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -107,6 +109,8 @@ bool YubiKey::deinit()
|
||||||
m_ykds_void = nullptr;
|
m_ykds_void = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
yk_release();
|
||||||
|
|
||||||
m_mutex.unlock();
|
m_mutex.unlock();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue