提交 4e5dbaf6 编写于 作者: L liubb_0516

bugfix:ipc findornewobject delete decstrongref when updateproto failed

Signed-off-by: Nliubb_0516 <liubeibei8@huawei.com>
上级 00b47491
......@@ -480,7 +480,7 @@ int IPCObjectProxy::GetSessionFromDBinderService()
int32_t err = SendRequestInner(true, GET_PROTO_INFO, data, reply, option);
if (err != ERR_NONE) {
ZLOGI(LABEL, "GET_PROTO_INFO transact return error = %{public}d", err);
ZLOGE(LABEL, "GET_PROTO_INFO transact return error = %{public}d", err);
return IRemoteObject::IF_PROT_ERROR;
}
......
......@@ -161,13 +161,12 @@ sptr<IRemoteObject> IPCProcessSkeleton::FindOrNewObject(int handle)
sptr<IPCObjectProxy> remoteProxy = reinterpret_cast<IPCObjectProxy *>(result.GetRefPtr());
remoteProxy->WaitForInit();
#ifndef CONFIG_IPC_SINGLE
if (remoteProxy->GetProto() == IRemoteObject::IF_PROT_ERROR) {
DBINDER_LOGE("init rpc proxy:%{public}d failed", handle);
remoteProxy->DecStrongRef(this);
return nullptr;
}
#endif
DBINDER_LOGI("handle:%{public}d, proto:%{public}d", handle, remoteProxy->GetProto());
return result;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册