Skip to content

Commit a85b25a

Browse files
committed
card-piv.c - fix memory leak
1 parent 3854803 commit a85b25a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/libopensc/card-piv.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5350,6 +5350,7 @@ piv_finish(sc_card_t *card)
53505350
piv_clear_sm_session(&priv->sm_session);
53515351
#endif /* USE_PIV_SM */
53525352

5353+
free(priv->cert_signer_der);
53535354
free(priv);
53545355
card->drv_data = NULL; /* priv */
53555356
}
@@ -5927,7 +5928,7 @@ static int piv_init(sc_card_t *card)
59275928

59285929
/* If SM did not start, or is not expected to start, continue on without it */
59295930
}
5930-
#endif /* USE_PIV_SM */
5931+
#endif /* defined(USE_PIV_SM) || defined(USE_SM_NIST) */
59315932

59325933
/*
59335934
* 800-73-3 cards may have a history object

0 commit comments

Comments
 (0)