Fix a memory issue when calling LOG_J in port.cc
The connection delete message may be processed when a port is being deleted. Calling LOG_J here needs to access the port object that may have been partially released. This fixes the memcheck bot failure. TBR=pthatcher@webrtc.org BUG= Review-Url: https://codereview.webrtc.org/2026403003 Cr-Commit-Position: refs/heads/master@{#13002}
This commit is contained in:
parent
5ecf16c072
commit
18f9da0286
@ -1404,8 +1404,8 @@ void Connection::MaybeUpdatePeerReflexiveCandidate(
|
||||
|
||||
void Connection::OnMessage(rtc::Message *pmsg) {
|
||||
ASSERT(pmsg->message_id == MSG_DELETE);
|
||||
LOG_J(LS_INFO, this) << "Connection deleted with number of pings sent: "
|
||||
<< num_pings_sent_;
|
||||
LOG(LS_INFO) << "Connection deleted with number of pings sent: "
|
||||
<< num_pings_sent_;
|
||||
SignalDestroyed(this);
|
||||
delete this;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user