From 7640ffabd74a79bf4b40688a4b664950a846e989 Mon Sep 17 00:00:00 2001 From: pbos Date: Mon, 30 Nov 2015 09:16:59 -0800 Subject: [PATCH] Initialize type_preference_ in TestPort. Prevents use of undefined memory for logging during PortTest.TestLoopbackCal which was recently enabled for all release builds. BUG= R=asapersson@webrtc.org TBR=pthatcher@webrtc.org Review URL: https://codereview.webrtc.org/1480233003 Cr-Commit-Position: refs/heads/master@{#10842} --- webrtc/p2p/base/port_unittest.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webrtc/p2p/base/port_unittest.cc b/webrtc/p2p/base/port_unittest.cc index 261da0aeae..896cef1159 100644 --- a/webrtc/p2p/base/port_unittest.cc +++ b/webrtc/p2p/base/port_unittest.cc @@ -202,7 +202,7 @@ class TestPort : public Port { private: rtc::scoped_ptr last_stun_buf_; rtc::scoped_ptr last_stun_msg_; - int type_preference_; + int type_preference_ = 0; }; class TestChannel : public sigslot::has_slots<> {