Fix the ipc problem of duplicate handle

Signed-off-by: liubb_0516 <liubeibei8@huawei.com>
This commit is contained in:
liubb_0516
2022-01-06 12:40:43 +00:00
committed by Gitee
parent 852b47b4d4
commit dc593c48fa
@@ -766,8 +766,8 @@ int32_t SendRequest(const IpcContext *context, SvcIdentity sid, uint32_t code,
return ret;
}
buf.cmd = BC_TRANSACTION;
IpcIo tempIo;
if (data == NULL) {
IpcIo tempIo;
data = &tempIo;
uint8_t tmpData[IPC_IO_DATA_TEMP];
IpcIoInit(data, tmpData, IPC_IO_DATA_TEMP, 0);
@@ -852,8 +852,8 @@ int32_t SendReply(const IpcContext* context, void* ipcMsg, IpcIo* reply)
struct TransactData buf = {0};
buf.cmd = BC_REPLY;
SvcIdentity sid = {0};
IpcIo tempIo;
if (reply == NULL) {
IpcIo tempIo;
reply = &tempIo;
uint8_t tmpData[IPC_IO_DATA_TEMP];
IpcIoInit(reply, tmpData, IPC_IO_DATA_TEMP, 0);