gpg: Use usual free semantics for packet structure free functions.
authorWerner Koch <wk@gnupg.org>
Tue, 15 Nov 2016 15:23:41 +0000 (16:23 +0100)
committerWerner Koch <wk@gnupg.org>
Tue, 15 Nov 2016 15:24:09 +0000 (16:24 +0100)
commit8ea3b4c4102dc67ed83d4419b7171e422fc01047
tree6533a1d27eade4f32ea5c5edad5518da97ce16af
parent12834e84aca9d74800245f0f2f2e6b5123e76173
gpg: Use usual free semantics for packet structure free functions.

* g10/free-packet.c (free_attributes): Turn function into a nop for a
NULL arg.
(free_user_id): Ditto.
(free_compressed): Ditto.
(free_encrypted): Ditto.
(free_plaintext): Ditto.
(release_public_key_parts): Avoid extra check for NULL.
* g10/getkey.c (get_best_pubkey_byname): Ditto.
--

This change avoid surprises because it is common that function named
like free and taking a pointer also have similar semantics.

Signed-off-by: Werner Koch <wk@gnupg.org>
g10/free-packet.c
g10/getkey.c