From 919f87fb36af15bd995eca00c53a1dee1c8b5000 Mon Sep 17 00:00:00 2001 From: "pbos@webrtc.org" Date: Mon, 16 Dec 2013 14:55:54 +0000 Subject: [PATCH] Delete capturers after destroying streams in test. Since the renderers in CallTest.SendsAndReceiveStreams also stopped the capturers they must be deleted after the VideoReceiveStream is stopped or an use-after-free may occur. R=mflodman@webrtc.org BUG= Review URL: https://webrtc-codereview.appspot.com/5969004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@5300 4adac7df-926f-26a2-2b94-8c16560cd09d --- webrtc/video/call_tests.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webrtc/video/call_tests.cc b/webrtc/video/call_tests.cc index 2e902a4a6..1b0c87487 100644 --- a/webrtc/video/call_tests.cc +++ b/webrtc/video/call_tests.cc @@ -853,9 +853,9 @@ TEST_F(CallTest, SendsAndReceivesMultipleStreams) { for (size_t i = 0; i < kNumStreams; ++i) { frame_generators[i]->Stop(); - delete frame_generators[i]; sender_call->DestroyVideoSendStream(send_streams[i]); receiver_call->DestroyVideoReceiveStream(receive_streams[i]); + delete frame_generators[i]; delete observers[i]; }