Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1437)

Unified Diff: content/browser/loader/stream_resource_handler.cc

Issue 232843003: Fix IOBuffer leak in CertificateResourceHandler and StreamResourceHandler. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/loader/certificate_resource_handler.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/loader/stream_resource_handler.cc
diff --git a/content/browser/loader/stream_resource_handler.cc b/content/browser/loader/stream_resource_handler.cc
index 82fc9c63a98e352bf818f47f841a30138d9b28a0..564165929add133bc42ebc86fde5c88993b4d602 100644
--- a/content/browser/loader/stream_resource_handler.cc
+++ b/content/browser/loader/stream_resource_handler.cc
@@ -88,8 +88,8 @@ bool StreamResourceHandler::OnReadCompleted(int request_id,
// Release the ownership of the buffer, and store a reference
// to it. A new one will be allocated in OnWillRead().
- net::IOBuffer* buffer = NULL;
- read_buffer_.swap(&buffer);
+ scoped_refptr<net::IOBuffer> buffer;
+ read_buffer_.swap(buffer);
stream_->AddData(buffer, bytes_read);
if (!stream_->can_add_data())
« no previous file with comments | « content/browser/loader/certificate_resource_handler.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698