diff --git a/euicc/es10cex.c b/euicc/es10cex.c index ecf90bb..77e34f7 100644 --- a/euicc/es10cex.c +++ b/euicc/es10cex.c @@ -297,4 +297,48 @@ int es10cex_get_euiccinfo2(struct euicc_ctx *ctx, struct es10cex_euiccinfo2 **al void es10cex_free_euiccinfo2(struct es10cex_euiccinfo2 *info) { + if (info->euiccCiPKIdListForVerification) + { + for (int i = 0; info->euiccCiPKIdListForVerification[i] != NULL; i++) + { + free(info->euiccCiPKIdListForVerification[i]); + } + free(info->euiccCiPKIdListForVerification); + } + + if (info->euiccCiPKIdListForSigning) + { + for (int i = 0; info->euiccCiPKIdListForSigning[i] != NULL; i++) + { + free(info->euiccCiPKIdListForSigning[i]); + } + free(info->euiccCiPKIdListForSigning); + } + + if (info->uiccCapability) + { + free(info->uiccCapability); + } + + if (info->rspCapability) + { + free(info->rspCapability); + } + + if (info->forbiddenProfilePolicyRules) + { + free(info->forbiddenProfilePolicyRules); + } + + if (info->certificationDataObject.discoveryBaseURL) + { + free(info->certificationDataObject.discoveryBaseURL); + } + + if (info->certificationDataObject.platformLabel) + { + free(info->certificationDataObject.platformLabel); + } + + free(info); } diff --git a/src/applet/chip/info.c b/src/applet/chip/info.c index f03c6c2..36ed90c 100644 --- a/src/applet/chip/info.c +++ b/src/applet/chip/info.c @@ -119,7 +119,7 @@ static int applet_main(int argc, char **argv) jprint_success(jdata); free(eid); - // es10cex_free_euiccinfo2(&euiccinfo2); + es10cex_free_euiccinfo2(euiccinfo2); return 0; }