修复内存越界问题RemoveRequest
This commit is contained in:
parent
3a30aed243
commit
fe5b4a67ec
@ -45,7 +45,6 @@ void MasterSvrMgr::_SS_MS_ResponseTargetServer(f8::MsgHdr& hdr, const ss::SS_MS_
|
|||||||
{
|
{
|
||||||
f8::MsgHdr* context_hdr = GetHdrByContextId(msg.context_id());
|
f8::MsgHdr* context_hdr = GetHdrByContextId(msg.context_id());
|
||||||
if (context_hdr) {
|
if (context_hdr) {
|
||||||
bool auto_free = true;
|
|
||||||
int socket_handle = context_hdr->socket_handle;
|
int socket_handle = context_hdr->socket_handle;
|
||||||
if (msg.error_code() == 0) {
|
if (msg.error_code() == 0) {
|
||||||
TargetConn* conn = TargetConnMgr::Instance()->RecreateTargetConn(
|
TargetConn* conn = TargetConnMgr::Instance()->RecreateTargetConn(
|
||||||
@ -54,11 +53,12 @@ void MasterSvrMgr::_SS_MS_ResponseTargetServer(f8::MsgHdr& hdr, const ss::SS_MS_
|
|||||||
);
|
);
|
||||||
assert(conn);
|
assert(conn);
|
||||||
if (conn) {
|
if (conn) {
|
||||||
auto_free = false;
|
RemoveRequest(socket_handle, msg.context_id(), false);
|
||||||
conn->ForwardClientMsgEx(context_hdr);
|
conn->ForwardClientMsgEx(context_hdr);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
RemoveRequest(socket_handle, msg.context_id(), auto_free);
|
RemoveRequest(socket_handle, msg.context_id(), true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user