mirror of
https://gitee.com/openharmony/security_deviceauth
synced 2024-11-26 22:20:34 +00:00
update frameworks/src/standard/ipc_dev_auth_stub.cpp.
Signed-off-by: chenzhengyue <chenzhengyue@huawei.com>
This commit is contained in:
parent
4ab1a10e6e
commit
54645bb796
@ -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;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user