g10: Fix use-after-free.
authorJustus Winter <justus@g10code.com>
Tue, 15 Nov 2016 14:06:28 +0000 (15:06 +0100)
committerJustus Winter <justus@g10code.com>
Tue, 15 Nov 2016 14:38:09 +0000 (15:38 +0100)
commitbd60742925414e0ef2a497df827c1913ea211a44
treee6d93e8edd5b1bb0578902223a40f300212e9164
parent26c7c1d72c5f2acb3edb58d610c09a635c87bdbf
g10: Fix use-after-free.

* g10/getkey.c (pubkey_cmp): Make a copy of the user id.
(get_best_pubkey_byname): Free the user ids.

Signed-off-by: Justus Winter <justus@g10code.com>
g10/getkey.c