mirror of
git://git.gnupg.org/gnupg.git
synced 2024-12-22 10:19:57 +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
|
||||
pubkey_free (struct pubkey *key)
|
||||
{
|
||||
xfree (key->pk);
|
||||
release_kbnode (key->keyblock);
|
||||
xfree (key);
|
||||
if (key)
|
||||
{
|
||||
xfree (key->pk);
|
||||
release_kbnode (key->keyblock);
|
||||
xfree (key);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
Loading…
x
Reference in New Issue
Block a user