Skip to content

Commit

Permalink
card-piv.c - fix memory leak
Browse files Browse the repository at this point in the history
  • Loading branch information
dengert committed Apr 5, 2024
1 parent 3854803 commit a85b25a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/libopensc/card-piv.c
Original file line number Diff line number Diff line change
Expand Up @@ -5350,6 +5350,7 @@ piv_finish(sc_card_t *card)
piv_clear_sm_session(&priv->sm_session);
#endif /* USE_PIV_SM */

free(priv->cert_signer_der);
free(priv);
card->drv_data = NULL; /* priv */
}
Expand Down Expand Up @@ -5927,7 +5928,7 @@ static int piv_init(sc_card_t *card)

/* If SM did not start, or is not expected to start, continue on without it */
}
#endif /* USE_PIV_SM */
#endif /* defined(USE_PIV_SM) || defined(USE_SM_NIST) */

/*
* 800-73-3 cards may have a history object
Expand Down

0 comments on commit a85b25a

Please sign in to comment.