RTCPeerConnection(objc): avoid leaking ICE candidate on addition.
BUG=2670 R=wu@webrtc.org Review URL: https://webrtc-codereview.appspot.com/4379004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@5199 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
parent
8418e9696b
commit
e0034557a7
@ -117,9 +117,9 @@ class RTCSetSessionDescriptionObserver : public SetSessionDescriptionObserver {
|
||||
}
|
||||
|
||||
- (BOOL)addICECandidate:(RTCICECandidate *)candidate {
|
||||
const webrtc::IceCandidateInterface *iceCandidate = candidate.candidate;
|
||||
return self.peerConnection->AddIceCandidate(iceCandidate);
|
||||
delete iceCandidate;
|
||||
talk_base::scoped_ptr<const webrtc::IceCandidateInterface> iceCandidate(
|
||||
candidate.candidate);
|
||||
return self.peerConnection->AddIceCandidate(iceCandidate.get());
|
||||
}
|
||||
|
||||
- (BOOL)addStream:(RTCMediaStream *)stream
|
||||
|
Loading…
x
Reference in New Issue
Block a user