diff options
author | mbelshe@google.com <mbelshe@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-13 06:08:41 +0000 |
---|---|---|
committer | mbelshe@google.com <mbelshe@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-13 06:08:41 +0000 |
commit | 44f91fa953b72b0af52e2e91ea22c55af8b02ec7 (patch) | |
tree | 9e165d0a4aafd927613ef1610d4e6f4472d55f9a /net/flip | |
parent | 727714ad64a74c3946191ae6d252879a6762bb23 (diff) | |
download | chromium_src-44f91fa953b72b0af52e2e91ea22c55af8b02ec7.zip chromium_src-44f91fa953b72b0af52e2e91ea22c55af8b02ec7.tar.gz chromium_src-44f91fa953b72b0af52e2e91ea22c55af8b02ec7.tar.bz2 |
Mix mismatched new[] with delete. (should be delete[]).
BUG=none
TEST=none
TBR=jar@chromium.org
Review URL: http://codereview.chromium.org/267071
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28799 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/flip')
-rw-r--r-- | net/flip/flip_framer_test.cc | 14 | ||||
-rw-r--r-- | net/flip/flip_session.cc | 2 |
2 files changed, 8 insertions, 8 deletions
diff --git a/net/flip/flip_framer_test.cc b/net/flip/flip_framer_test.cc index f0ca835..e37d54f 100644 --- a/net/flip/flip_framer_test.cc +++ b/net/flip/flip_framer_test.cc @@ -103,7 +103,7 @@ TEST_F(FlipFramerTest, HeaderBlock) { FlipFramer framer; // Encode the header block into a SynStream frame. - scoped_ptr<FlipSynStreamControlFrame> frame( + scoped_array<FlipSynStreamControlFrame> frame( framer.CreateSynStream(1, 1, true, &headers)); EXPECT_TRUE(frame.get() != NULL); @@ -151,26 +151,26 @@ TEST_F(FlipFramerTest, BasicCompression) { headers["content-length"] = "12"; FlipFramer framer; - scoped_ptr<FlipSynStreamControlFrame> + scoped_array<FlipSynStreamControlFrame> frame1(framer.CreateSynStream(1, 1, true, &headers)); - scoped_ptr<FlipSynStreamControlFrame> + scoped_array<FlipSynStreamControlFrame> frame2(framer.CreateSynStream(1, 1, true, &headers)); // Expect the second frame to be more compact than the first. - EXPECT_LE(frame2->length(), frame1->length()); + EXPECT_LE(frame2.get()->length(), frame1.get()->length()); // Decompress the first frame - scoped_ptr<FlipFrame> frame3( + scoped_array<FlipFrame> frame3( framer.DecompressFrame(reinterpret_cast<FlipFrame*>(frame1.get()))); // Decompress the second frame - scoped_ptr<FlipFrame> frame4( + scoped_array<FlipFrame> frame4( framer.DecompressFrame(reinterpret_cast<FlipFrame*>(frame2.get()))); // Expect frames 3 & 4 to be the same. EXPECT_EQ(0, memcmp(frame3.get(), frame4.get(), - sizeof(FlipFrame) + frame3->length())); + sizeof(FlipFrame) + frame3.get()->length())); } TEST_F(FlipFramerTest, Basic) { diff --git a/net/flip/flip_session.cc b/net/flip/flip_session.cc index 313855f..4854067 100644 --- a/net/flip/flip_session.cc +++ b/net/flip/flip_session.cc @@ -281,7 +281,7 @@ int FlipSession::CreateStream(FlipDelegate* delegate) { IOBufferWithSize* buffer = new IOBufferWithSize(length); memcpy(buffer->data(), syn_frame, length); - delete syn_frame; + delete[] syn_frame; queue_.push(PrioritizedIOBuffer(buffer, priority)); static StatsCounter flip_requests("flip.requests"); |