mirror of
git://git.gnupg.org/gnupg.git
synced 2024-12-31 11:41:32 +01:00
g10: Release resources when returning an error in get_seckey.
* g10/getkey.c (get_seckey): If the key doesn't have a secret key, release *PK. -- Signed-off-by: Neal H. Walfield <neal@g10code.com>.
This commit is contained in:
parent
cab581c486
commit
1b601de06a
@ -562,7 +562,11 @@ get_seckey (PKT_public_key *pk, u32 *keyid)
|
||||
release_kbnode (keyblock);
|
||||
|
||||
if (!err)
|
||||
err = agent_probe_secret_key (/*ctrl*/NULL, pk);
|
||||
{
|
||||
err = agent_probe_secret_key (/*ctrl*/NULL, pk);
|
||||
if (err)
|
||||
release_public_key_parts (pk);
|
||||
}
|
||||
|
||||
return err;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user