Skip to content

Commit ebc961d

Browse files
Edison AiMichael Schwarcz
authored andcommitted
TF-M patch: Free connection handle in psa_reply (TF-M issue #263)
- Link to bug tracking: https://developer.trustedfirmware.org/T263
1 parent 5f38878 commit ebc961d

File tree

1 file changed

+3
-3
lines changed
  • components/TARGET_PSA/TARGET_TFM/COMPONENT_SPE/secure_fw/core/ipc

1 file changed

+3
-3
lines changed

components/TARGET_PSA/TARGET_TFM/COMPONENT_SPE/secure_fw/core/ipc/tfm_svcalls.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -256,9 +256,6 @@ void tfm_svcall_psa_close(uint32_t *args, int32_t ns_caller)
256256
* and scheduler triggered
257257
*/
258258
tfm_spm_send_event(service, msg);
259-
260-
/* Service handle is not used anymore */
261-
tfm_spm_free_conn_handle(service, handle);
262259
}
263260

264261
/*********************** SVC handler for PSA Service APIs ********************/
@@ -788,6 +785,9 @@ static void tfm_svcall_psa_reply(uint32_t *args)
788785
update_caller_outvec_len(msg);
789786
break;
790787
case PSA_IPC_DISCONNECT:
788+
/* Service handle is not used anymore */
789+
tfm_spm_free_conn_handle(service, msg->handle);
790+
791791
/*
792792
* If the message type is PSA_IPC_DISCONNECT, then the status code is
793793
* ignored

0 commit comments

Comments
 (0)