First off, I’m sorry for my poor explanation.
At first, mbedtls_pk_init() and mbedtls_pk_parse_public_key() is called for extracting Q.
(This is executed with standard library.)
And then mbedtls_pk_context value for Q is delivered to another function.
And then, this new called function will run below with delivered Q value.
ecp = mbedtls_pk_ec(key)
Q = ecp->Q;
(Standard library cannot be run here. So, mbedtls_memory_buffer_alloc_init() is called here. )
I called “mbedtls_ecp_point_init(&Q)” after mbedtls_pk_init() and mbedtls_pk_parse_public_key() are called.
I might guess I don’t need to initiate Q value through mbedtls_ecp_point_init() again.
I also guess It might not make “FATAL: mbedtls_free() outside of managed space”, if I don’t call mbedtls_ecp_point_init(&Q).
What do you think about it?
Thank a lot,