TF-M patch: Free connection handle in psa_reply (TF-M issue #263)

- Link to bug tracking: https://developer.trustedfirmware.org/T263
pull/9836/head
Edison Ai 2019-02-22 10:29:28 +08:00 committed by Michael Schwarcz
parent 5f38878f3a
commit ebc961dab8
1 changed files with 3 additions and 3 deletions

View File

@ -256,9 +256,6 @@ void tfm_svcall_psa_close(uint32_t *args, int32_t ns_caller)
* and scheduler triggered
*/
tfm_spm_send_event(service, msg);
/* Service handle is not used anymore */
tfm_spm_free_conn_handle(service, handle);
}
/*********************** SVC handler for PSA Service APIs ********************/
@ -788,6 +785,9 @@ static void tfm_svcall_psa_reply(uint32_t *args)
update_caller_outvec_len(msg);
break;
case PSA_IPC_DISCONNECT:
/* Service handle is not used anymore */
tfm_spm_free_conn_handle(service, msg->handle);
/*
* If the message type is PSA_IPC_DISCONNECT, then the status code is
* ignored