Skip to content

Commit

Permalink
ta: storage: fix ta_storage_cmd_key_in_persistent() cleanup
Browse files Browse the repository at this point in the history
Fixes the error cleanup path in two places where a created test object
was supposed to be removed.

Fixes: 90f2335 ("Test Persistent Object with keys")
Signed-off-by: Jens Wiklander <[email protected]>
Reviewed-by: Jerome Forissier <[email protected]>
Reviewed-by: Etienne Carriere <[email protected]>
  • Loading branch information
jenswi-linaro committed Nov 30, 2023
1 parent e18381f commit 23a404d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ta/storage/storage.c
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,7 @@ TEE_Result ta_storage_cmd_key_in_persistent(uint32_t param_types,
result = check_obj(&keyInfo, &keyInfo2);
if (result != TEE_SUCCESS) {
EMSG("keyInfo and keyInfo2 are different");
goto cleanup2;
goto cleanup3;
}

TEE_CloseObject(persistent_key);
Expand All @@ -504,7 +504,7 @@ TEE_Result ta_storage_cmd_key_in_persistent(uint32_t param_types,
result = check_obj(&keyInfo3, &keyInfo2);
if (result != TEE_SUCCESS) {
EMSG("keyInfo2 and keyInfo3 are different");
goto cleanup2;
goto cleanup3;
}

result = TEE_AllocateOperation(&encrypt_op, alg, TEE_MODE_ENCRYPT,
Expand Down

0 comments on commit 23a404d

Please sign in to comment.