gpg: Fix attempt to double free an UID structure.
* g10/getkey.c (get_best_pubkey_byname): Set released .UID to NULL.
--
Phil Pennock reported an assertion failure when doing
% gpg --auto-key-locate dane --locate-keys someone
gpg: Ohhhh jeeee: Assertion "uid->ref > 0" in \
free_user_id failed (free-packet.c:310)
on his keyring. This patch is not tested but a good guess.
Signed-off-by: Werner Koch <wk@gnupg.org>
(cherry picked from commit
4a130bbc2c2f4be6e8c6357512a943f435ade28f)
Gbp-Pq: Name 0048-gpg-Fix-attempt-to-double-free-an-UID-structure.patch