update frameworks/src/standard/ipc_dev_auth_stub.cpp.

Signed-off-by: chenzhengyue <chenzhengyue@huawei.com>
This commit is contained in:
陈正跃 2022-01-17 08:57:59 +00:00 committed by Gitee
parent 4ab1a10e6e
commit 54645bb796
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -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;
}
}