mirror of
git://git.gnupg.org/gnupg.git
synced 2024-12-23 10:29:58 +01:00
gpg: Add standard free() semantic to pubkey_free.
* g10/getkey.c (pubkey_free): Check for NULL arg. -- We don't like surprises ;-) Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
parent
ef7b7e9160
commit
04c9cddda9
@ -369,9 +369,12 @@ getkey_disable_caches ()
|
|||||||
void
|
void
|
||||||
pubkey_free (struct pubkey *key)
|
pubkey_free (struct pubkey *key)
|
||||||
{
|
{
|
||||||
xfree (key->pk);
|
if (key)
|
||||||
release_kbnode (key->keyblock);
|
{
|
||||||
xfree (key);
|
xfree (key->pk);
|
||||||
|
release_kbnode (key->keyblock);
|
||||||
|
xfree (key);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
Loading…
x
Reference in New Issue
Block a user