mirror of
https://github.com/openharmony/security_device_auth.git
synced 2026-08-25 09:19:33 -04:00
@@ -113,7 +113,7 @@ void DeInitIpcCallBackList(void)
|
||||
for (i = 0; i < IPC_CALL_BACK_MAX_NODES; i++) {
|
||||
ResetIpcCallBackNode(g_ipcCallBackList.ctx[i]);
|
||||
}
|
||||
delete g_ipcCallBackList.ctx;
|
||||
delete[] g_ipcCallBackList.ctx;
|
||||
g_ipcCallBackList.ctx = nullptr;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@ ServiceDevAuth::~ServiceDevAuth()
|
||||
{
|
||||
maxCallMapSz = MAX_CALLMAP_SIZE;
|
||||
if (callMapTable != nullptr) {
|
||||
delete callMapTable;
|
||||
delete[] callMapTable;
|
||||
callMapTable = nullptr;
|
||||
}
|
||||
callMapElemNum = 0;
|
||||
@@ -212,12 +212,12 @@ int32_t ServiceDevAuth::SetCallMap(IpcServiceCall method, int32_t methodId)
|
||||
if (callMapTmp != nullptr) {
|
||||
eno = memcpy_s(callMapTable, len, callMapTmp, (sizeof(IpcServiceCallMap) * callMapElemNum));
|
||||
if (eno != EOK) {
|
||||
delete callMapTable;
|
||||
delete[] callMapTable;
|
||||
callMapTable = callMapTmp;
|
||||
maxCallMapSz -= MAX_CALLMAP_SIZE;
|
||||
return HC_ERR_MEMORY_COPY;
|
||||
}
|
||||
delete callMapTmp;
|
||||
delete[] callMapTmp;
|
||||
callMapTmp = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user