mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-05-25 09:40:57 -04:00
Only remove keys on exit if they would remove on lock (#2985)
* Don't remove keys on app exit that would not be removed due to database locking. * Restores behavior from 2.3.4 * Fixes #2980
This commit is contained in:
parent
bc5173bac7
commit
cc27a367d6
1 changed files with 5 additions and 2 deletions
|
@ -45,8 +45,11 @@ SSHAgent::~SSHAgent()
|
|||
{
|
||||
auto it = m_addedKeys.begin();
|
||||
while (it != m_addedKeys.end()) {
|
||||
OpenSSHKey key = it.key();
|
||||
removeIdentity(key);
|
||||
// Remove key if requested to remove on lock
|
||||
if (it.value()) {
|
||||
OpenSSHKey key = it.key();
|
||||
removeIdentity(key);
|
||||
}
|
||||
it = m_addedKeys.erase(it);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue