提交 9795dfc6 编写于 作者: Y Yippo

Description:mapDBinderStubRegisters_遍历删除修改

Feature or Bugfix:Bugfix
Binary Source: No
Signed-off-by: NYippo <liuyibo12@huawei.com>
上级 09e63005
......@@ -275,9 +275,11 @@ bool DBinderService::DeleteDBinderStub(const std::u16string &service, const std:
return false;
}
for (auto mapIt = mapDBinderStubRegisters_.begin(); mapIt != mapDBinderStubRegisters_.end(); mapIt++) {
for (auto mapIt = mapDBinderStubRegisters_.begin(); mapIt != mapDBinderStubRegisters_.end();) {
if (mapIt->second == reinterpret_cast<binder_uintptr_t>((*it).GetRefPtr())) {
mapDBinderStubRegisters_.erase(mapIt);
mapIt = mapDBinderStubRegisters_.erase(mapIt);
} else {
++mapIt;
}
}
DBinderStubRegisted_.erase(it);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册