ta/wallet_ta.c
/**
  * Called when a session is closed, sess_ctx hold the value that was
  * assigned by TA_OpenSessionEntryPoint(). Is the responsibility of
  * the Trusted Application to deallocate the session context if memory
  * has been allocated for it.
  * \param sess_ctx The pointer set in the function TA_OpenSessionEntryPoint().
  */
Called when a session is closed, sess_ctx hold the value that was
assigned by TA_OpenSessionEntryPoint(). Is the responsibility of
the Trusted Application to deallocate the session context if memory
has been allocated for it.
\param sess_ctx The pointer set in the function TA_OpenSessionEntryPoint().
Called when a session is closed sess_ctx hold the value that was assigned by TA_OpenSessionEntryPoint () . Is the responsibility of the Trusted Application to deallocate the session context if memory has been allocated for it . \ param sess_ctx The pointer set in the function TA_OpenSessionEntryPoint () .
void TA_CloseSessionEntryPoint(void *sess_ctx)
{
	#ifdef OP_TEE_TA
	DMSG("has been called (session with the TA will be closed.)");
	#endif
	TEE_Free(((Session_data *)sess_ctx)->wallet_handle);
	TEE_Free(((Session_data *)sess_ctx)->storageID);
	TEE_Free(((Session_data *)sess_ctx)->write_cache);
	TEE_Free(((Session_data *)sess_ctx)->aes_encrypt_op);
	TEE_Free(((Session_data *)sess_ctx)->aes_decrypt_op);
	TEE_Free(((Session_data *)sess_ctx)->hmac_op1_internal);
	TEE_Free(((Session_data *)sess_ctx)->hmac_op2_internal);
	TEE_Free(((Session_data *)sess_ctx)->hmac_op1);
	TEE_Free(((Session_data *)sess_ctx)->hmac_op2);
	TEE_Free(((Session_data *)sess_ctx)->sha_op_internal);
	TEE_Free(((Session_data *)sess_ctx)->sha_op1);
	TEE_Free(((Session_data *)sess_ctx)->sha_op2);
	TEE_Free(((Session_data *)sess_ctx)->sha_op3);
	TEE_Free(((Session_data *)sess_ctx)->sha_op4);
	TEE_Free(((Session_data *)sess_ctx)->current_wallet);
	TEE_Free(sess_ctx);
}
void TA_CloseSessionEntryPoint ( void * sess_ctx ) { #ifdef OP_TEE_TA DMSG ( " " ) ; #endif TEE_Free ( ( ( Session_data * ) sess_ctx ) -> wallet_handle ) ; TEE_Free ( ( ( Session_data * ) sess_ctx ) -> storageID ) ; TEE_Free ( ( ( Session_data * ) sess_ctx ) -> write_cache ) ; TEE_Free ( ( ( Session_data * ) sess_ctx ) -> aes_encrypt_op ) ; TEE_Free ( ( ( Session_data * ) sess_ctx ) -> aes_decrypt_op ) ; TEE_Free ( ( ( Session_data * ) sess_ctx ) -> hmac_op1_internal ) ; TEE_Free ( ( ( Session_data * ) sess_ctx ) -> hmac_op2_internal ) ; TEE_Free ( ( ( Session_data * ) sess_ctx ) -> hmac_op1 ) ; TEE_Free ( ( ( Session_data * ) sess_ctx ) -> hmac_op2 ) ; TEE_Free ( ( ( Session_data * ) sess_ctx ) -> sha_op_internal ) ; TEE_Free ( ( ( Session_data * ) sess_ctx ) -> sha_op1 ) ; TEE_Free ( ( ( Session_data * ) sess_ctx ) -> sha_op2 ) ; TEE_Free ( ( ( Session_data * ) sess_ctx ) -> sha_op3 ) ; TEE_Free ( ( ( Session_data * ) sess_ctx ) -> sha_op4 ) ; TEE_Free ( ( ( Session_data * ) sess_ctx ) -> current_wallet ) ; TEE_Free ( sess_ctx ) ; }
Called when a session is closed, sess_ctx hold the value that was
 assigned by TA_OpenSessionEntryPoint().
Called when a session is closed sess_ctx hold the value that was assigned by TA_OpenSessionEntryPoint () .
/* Free the memory allocated for the session context */