From 0fe4e4898e2fa5fbb0949e05ec1c7b99963a5820 Mon Sep 17 00:00:00 2001 From: Doug Engert Date: Sat, 14 Dec 2024 06:30:44 -0600 Subject: [PATCH] card-openpgp.c - fixup --- src/libopensc/card-openpgp.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/libopensc/card-openpgp.c b/src/libopensc/card-openpgp.c index c7c0780e4d..2295da87c1 100644 --- a/src/libopensc/card-openpgp.c +++ b/src/libopensc/card-openpgp.c @@ -2915,11 +2915,12 @@ pgp_update_pubkey_blob(sc_card_t *card, sc_cardctl_openpgp_key_gen_store_info_t LOG_FUNC_RETURN(card->ctx, SC_ERROR_INVALID_ARGUMENTS); r = sc_pkcs15_encode_pubkey_as_spki(card->ctx, &p15pubkey, &data, &len); - /* key_info is missing from algo_id, which get allocated in + /* + * key_info is missing from algo_id, which get allocated in * sc_pkcs15_encode_pubkey_as_spki, so free it here. */ - free(p15pubkey->alg_id); - p15pubkey->alg_id = NULL; + free(p15pubkey.alg_id); + p15pubkey.alg_id = NULL; LOG_TEST_RET(card->ctx, r, "Cannot encode pubkey"); sc_log(card->ctx, "Updating blob %04X's content.", blob_id);