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 <mailhol.vincent@wanadoo.fr> Reviewed-by:
Etienne Carriere <etienne.carriere@foss.st.com> Reviewed-by:
Jens Wiklander <jens.wiklander@linaro.org>
Loading
Please register or sign in to comment