mirror of
git://git.gnupg.org/gnupg.git
synced 2024-06-02 22:38:02 +02: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)
|
if (pk)
|
||||||
*pk = best.key;
|
{
|
||||||
|
release_public_key_parts (pk);
|
||||||
|
*pk = best.key;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
release_public_key_parts (&best.key);
|
release_public_key_parts (&best.key);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user