Skip to content
Commit 9748d2a9 authored by Vincent Mailhol's avatar Vincent Mailhol Committed by Jérôme Forissier
Browse files

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: default avatarVincent Mailhol <mailhol.vincent@wanadoo.fr>
Reviewed-by: default avatarEtienne Carriere <etienne.carriere@foss.st.com>
Reviewed-by: Jens Wiklander's avatarJens Wiklander <jens.wiklander@linaro.org>
parent 4e5d6c09
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment