Home GnuPG
Diffusion GnuPG 0f780b1aebb1

g10: Make call to agent_scd_serialno more robust.

Description

g10: Make call to agent_scd_serialno more robust.

* g10/call-agent.c (agent_scd_serialno): Make sure that NULL is stored
on error at r_serialno.
* g10/card-util.c (card_status): Simplify freeing of seriaono.
(factory_reset): Ditto.

This pattern is what we use with other functions returning an
allocated string and thus less surprising.

Details

Provenance
wernerAuthored on Oct 26 2020, 12:49 PM
Parents
rGcf4b8a27c37d: g10,sm: Use gnupg_access at two more places
Branches
Unknown
Tags
Unknown