Home GnuPG
Diffusion GnuPG 8ea3b4c4102d

gpg: Use usual free semantics for packet structure free functions.
8ea3b4c4102dUnpublished

Unpublished Commit · Learn More

Not On Permanent Ref: This commit is not an ancestor of any permanent ref.

Description

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>

Details

Provenance
wernerAuthored on Nov 15 2016, 4:23 PM
Parents
rG12834e84aca9: g10: Optimize key iteration.
Branches
Unknown
Tags
Unknown

Event Timeline