Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ta: os_test: do not call TEE_CloseTASession() if session is not opened
The Global Platform specification [1] tells us that the session parameter of TEE_CloseTASession() is: An opened session handle The behaviour is unspecified if the session handle is not opened. Make sure not to call TEE_CloseTASession() with an invalid session handle when TEE_OpenTASession() fails by either: - doing an early return - adding an additional cleanup label [1] TEE Internal Core API Specification – Public Release v1.3.1, §4.9.2 "TEE_CloseTASession" Signed-off-by: Vincent Mailhol <[email protected]> Reviewed-by: Etienne Carriere <[email protected]> Reviewed-by: Jens Wiklander <[email protected]>
- Loading branch information