1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-12-22 10:19:57 +01:00

gpg: Fix double free on error.

* g10/card-util.c (card_status): Check an error return.

Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
This commit is contained in:
NIIBE Yutaka 2020-10-26 14:00:26 +09:00
parent 157f1de64e
commit a153d0f769

View File

@ -740,7 +740,8 @@ card_status (ctrl_t ctrl, estream_t fp, const char *serialno)
/* Select the original card again. */
err = agent_scd_serialno (&serialno1, serialno0);
xfree (serialno1);
if (!err)
xfree (serialno1);
leave:
xfree (serialno0);