gpg: Fix segv in get_best_pubkey_byname.
authorWerner Koch <wk@gnupg.org>
Fri, 28 Jul 2017 08:58:59 +0000 (10:58 +0200)
committerWerner Koch <wk@gnupg.org>
Fri, 28 Jul 2017 08:58:59 +0000 (10:58 +0200)
commit6496dc1f9d2aef3bf8cf950da2434c96f7a0145c
tree427cbc8c2d16d9d5f4edfb1644716217d9c20d6e
parent5516ef47a22dfdf9cdf56107f34d2bda9e46deec
gpg: Fix segv in get_best_pubkey_byname.

* g10/getkey.c (get_best_pubkey_byname): Init NEW.
--

We call free_user_id on NEW.uid and thus it needs to be initialized.

This fixes the ref-count or invisible segv bug from
GnuPG-bug-id: 3266

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