diff --git a/webrtc/test/fuzzers/pseudotcp_parser_fuzzer.cc b/webrtc/test/fuzzers/pseudotcp_parser_fuzzer.cc index 4e14a13eeb..5e4165e5d2 100644 --- a/webrtc/test/fuzzers/pseudotcp_parser_fuzzer.cc +++ b/webrtc/test/fuzzers/pseudotcp_parser_fuzzer.cc @@ -31,19 +31,18 @@ class FakeIPseudoTcpNotify : public cricket::IPseudoTcpNotify { struct Environment { explicit Environment(cricket::IPseudoTcpNotify* notifier): - ptcp(new cricket::PseudoTcp(notifier, 0)) { + ptcp(notifier, 0) { } - cricket::PseudoTcp* const ptcp; - // We need the thread to avoid some uninteresting crashes, since the // production code expects there to be a thread object available. rtc::AutoThread thread; + cricket::PseudoTcp ptcp; }; Environment* env = new Environment(new FakeIPseudoTcpNotify()); void FuzzOneInput(const uint8_t* data, size_t size) { - env->ptcp->NotifyPacket(reinterpret_cast(data), size); + env->ptcp.NotifyPacket(reinterpret_cast(data), size); } } // namespace webrtc