Fix a memory leak in SctpDataMediaChannelTest.
BUG=3492 R=wu@webrtc.org Review URL: https://webrtc-codereview.appspot.com/21699004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@6486 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
parent
85b19a1a12
commit
acede34aea
@ -81,13 +81,13 @@ class SctpFakeNetworkInterface : public cricket::MediaChannel::NetworkInterface,
|
||||
// an SCTP packet.
|
||||
virtual void OnMessage(talk_base::Message* msg) {
|
||||
LOG(LS_VERBOSE) << "SctpFakeNetworkInterface::OnMessage";
|
||||
talk_base::Buffer* buffer =
|
||||
talk_base::scoped_ptr<talk_base::Buffer> buffer(
|
||||
static_cast<talk_base::TypedMessageData<talk_base::Buffer*>*>(
|
||||
msg->pdata)->data();
|
||||
msg->pdata)->data());
|
||||
if (dest_) {
|
||||
dest_->OnPacketReceived(buffer, talk_base::PacketTime());
|
||||
dest_->OnPacketReceived(buffer.get(), talk_base::PacketTime());
|
||||
}
|
||||
delete buffer;
|
||||
delete msg->pdata;
|
||||
}
|
||||
|
||||
// Unsupported functions required to exist by NetworkInterface.
|
||||
|
Loading…
x
Reference in New Issue
Block a user