diff --git a/services/cert_manager_standard/cert_manager_service/main/os_dependency/idl/cm_ipc/cm_ipc_service.c b/services/cert_manager_standard/cert_manager_service/main/os_dependency/idl/cm_ipc/cm_ipc_service.c index 5ab82f9c3ad3cda9bc50e397c2058795c2e082d6..4996b7878f0459f773f106fd24d0f634ff4e8d91 100644 --- a/services/cert_manager_standard/cert_manager_service/main/os_dependency/idl/cm_ipc/cm_ipc_service.c +++ b/services/cert_manager_standard/cert_manager_service/main/os_dependency/idl/cm_ipc/cm_ipc_service.c @@ -316,15 +316,19 @@ void CmIpcServiceUninstallAllAppCert(const struct CmBlob *paramSetBlob, struct C int32_t ret = CM_SUCCESS; struct CmContext cmContext = {0}; - ret = CmGetProcessInfoForIPC(&cmContext); - if (ret != CM_SUCCESS) { - CM_LOG_E("CmGetProcessInfoForIPC fail, ret = %d", ret); - } + do { + ret = CmGetProcessInfoForIPC(&cmContext); + if (ret != CM_SUCCESS) { + CM_LOG_E("CmGetProcessInfoForIPC fail, ret = %d", ret); + break; + } - ret = CmRemoveAllAppCert(&cmContext); - if (ret != CM_SUCCESS) { - CM_LOG_E("CmRemoveAllAppCert fail"); - } + ret = CmRemoveAllAppCert(&cmContext); + if (ret != CM_SUCCESS) { + CM_LOG_E("CmRemoveAllAppCert fail"); + break; + } + } while (0); CmReport(__func__, &cmContext, NULL, ret); CmSendResponse(context, ret, NULL);