mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-03 22:56:33 +02:00
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.
This commit is contained in:
parent
cf4b8a27c3
commit
0f780b1aeb
2 changed files with 6 additions and 5 deletions
|
@ -1381,6 +1381,7 @@ agent_scd_serialno (char **r_serialno, const char *demand)
|
|||
char *serialno = NULL;
|
||||
char line[ASSUAN_LINELENGTH];
|
||||
|
||||
*r_serialno = NULL;
|
||||
err = start_agent (NULL, (1 | FLAG_FOR_CARD_SUPPRESS_ERRORS));
|
||||
if (err)
|
||||
return err;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue