mirror of git://git.gnupg.org/gnupg.git
gpg: Fix a memory leak in get_best_pubkey_byname.
* g10/getkey.c (get_best_pubkey_byname): Free the public key parts.
--
Cherry-picked from master commit:
e28572116f
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
This commit is contained in:
parent
beeab41e47
commit
2924ac374e
|
@ -1572,7 +1572,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…
Reference in New Issue