keyring: fix forgotten check
This commit is contained in:
parent
104ee12951
commit
7ec0823834
|
@ -183,7 +183,8 @@ public:
|
|||
void remove_keypair (const std::string&keyid) {
|
||||
if (pairs.count (keyid)) {
|
||||
sencode_destroy (pairs[keyid].pub.key);
|
||||
sencode_destroy (pairs[keyid].privkey);
|
||||
if (pairs[keyid].privkey)
|
||||
sencode_destroy (pairs[keyid].privkey);
|
||||
pairs.erase (keyid);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue