From 0322967865c70c1dc0f37447ae40ce8bce3e0513 Mon Sep 17 00:00:00 2001 From: Pol Henarejos Date: Sun, 25 Aug 2024 21:17:15 +0200 Subject: [PATCH] Free x509 cert on finish. Signed-off-by: Pol Henarejos --- src/openpgp/piv.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/openpgp/piv.c b/src/openpgp/piv.c index 7becd17..6eae778 100644 --- a/src/openpgp/piv.c +++ b/src/openpgp/piv.c @@ -161,6 +161,7 @@ static int x509_create_cert(void *pk_ctx, uint8_t algo, uint8_t slot, bool attes if (attestation) { mbedtls_ecdsa_free(&actx); } + mbedtls_x509write_crt_free(&ctx); return ret; }