diff --git a/components/TARGET_PSA/TARGET_TFM/COMPONENT_SPE/secure_fw/core/ipc/tfm_svcalls.c b/components/TARGET_PSA/TARGET_TFM/COMPONENT_SPE/secure_fw/core/ipc/tfm_svcalls.c index bdea0de852..68d244af5b 100644 --- a/components/TARGET_PSA/TARGET_TFM/COMPONENT_SPE/secure_fw/core/ipc/tfm_svcalls.c +++ b/components/TARGET_PSA/TARGET_TFM/COMPONENT_SPE/secure_fw/core/ipc/tfm_svcalls.c @@ -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 diff --git a/tools/importer/tfm_importer.json b/tools/importer/tfm_importer.json index 691ec9a5f4..cb55b9686c 100644 --- a/tools/importer/tfm_importer.json +++ b/tools/importer/tfm_importer.json @@ -96,7 +96,8 @@ "da01e3411fcf8010f4ae581946cf4b0e7753e024", "008bf1b2d176c04fb33985e0677e90e3800cb4ca", "67a4e6d723dfb199fdbe9a2cef57dbe58cbc026f", - "6354b9a47351a29ea24023c5471b63d39e091959" + "6354b9a47351a29ea24023c5471b63d39e091959", + "ebc961dab8630522fa341015260d9e75981f6982" ] }