result = mbedtls_ecp_check_pubkey(&public_key.grp, &public_key.Q); if (result != MBEDTLS_OK) goto CLEANUP; CLEANUP: mbedtls_ecp_point_free(&public_key.Q); mbedtls_ecp_group_free(&public_key.grp); mbedtls_ecp_keypair_free(&public_key); return result; } I am using the ESP32 port...