Fix memory error in gnupg_list_ids().