Index: net/socket/deterministic_socket_data_unittest.cc |
diff --git a/net/socket/deterministic_socket_data_unittest.cc b/net/socket/deterministic_socket_data_unittest.cc |
index 199dd0ba13a2d476a208e07bc44348fab6c75289..5e25aa0e7c209751cac1c22661591be553172615 100644 |
--- a/net/socket/deterministic_socket_data_unittest.cc |
+++ b/net/socket/deterministic_socket_data_unittest.cc |
@@ -131,7 +131,7 @@ void DeterministicSocketDataTest::AssertReadBufferEquals(const char* data, |
void DeterministicSocketDataTest::AssertSyncWriteEquals(const char* data, |
int len) { |
- scoped_refptr<IOBuffer> buf = new IOBuffer(len); |
+ scoped_refptr<IOBuffer> buf(new IOBuffer(len)); |
memcpy(buf->data(), data, len); |
// Issue the write, which will complete immediately |
@@ -152,7 +152,7 @@ void DeterministicSocketDataTest::AssertAsyncWriteEquals(const char* data, |
void DeterministicSocketDataTest::AssertWriteReturns(const char* data, |
int len, int rv) { |
- scoped_refptr<IOBuffer> buf = new IOBuffer(len); |
+ scoped_refptr<IOBuffer> buf(new IOBuffer(len)); |
memcpy(buf->data(), data, len); |
// Issue the read, which will complete asynchronously |