mbedtls_pk_free() function
Free the components of a #mbedtls_pk_context.
Arguments
ctx
The context to clear. It must have been initialized. If this is \c NULL, this function does nothing.
Notes
For contexts that have been set up with mbedtls_pk_setup_opaque(), this does not free the underlying PSA key and you still need to call psa_destroy_key() independently if you want to destroy that key.