mirror of
git://git.gnupg.org/gnupg.git
synced 2025-02-01 16:33:02 +01:00
gpg: Fix a memory leak in get_best_pubkey_byname.
* g10/getkey.c (get_best_pubkey_byname): Free the public key parts. Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
This commit is contained in:
parent
7d9aad63c4
commit
e28572116f
@ -1484,7 +1484,10 @@ get_best_pubkey_byname (ctrl_t ctrl, enum get_pubkey_modes mode,
|
||||
}
|
||||
|
||||
if (pk)
|
||||
*pk = best.key;
|
||||
{
|
||||
release_public_key_parts (pk);
|
||||
*pk = best.key;
|
||||
}
|
||||
else
|
||||
release_public_key_parts (&best.key);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user