Hi,

We are writing a client code which can accept or decline connection to the server - so for each connection I understand there is a mbedtls_ssl_context data established. Once the same is closed or not required we need to do deinitialize or free memory allocated to its member variables like - we need to free all memory allocated since we need it back else our application will run out of memory like:

        os_free(mbed_ctx->handshake);
        os_free(mbed_ctx->transform_negotiate);
        os_free(mbed_ctx->session_negotiate);
        os_free(mbed_ctx->in_buf);
        os_free(mbed_ctx->out_buf);

But there are many member variables which also need to free memory if allocated and assigned to it.

Is there a function / method that can free all memory for mbedtls_ssl_context instance variable?

Thanks in advance.

Regards,
Prakash