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

Unified Diff: content/browser/loader/certificate_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 | « no previous file | content/browser/loader/stream_resource_handler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/loader/certificate_resource_handler.cc
diff --git a/content/browser/loader/certificate_resource_handler.cc b/content/browser/loader/certificate_resource_handler.cc
index 4545f346fad594c10ae9e672e9b61fa706fe8c34..3c39599f5b1a602c447c9093cba7a2e7e8d1c111 100644
--- a/content/browser/loader/certificate_resource_handler.cc
+++ b/content/browser/loader/certificate_resource_handler.cc
@@ -91,8 +91,8 @@ bool CertificateResourceHandler::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);
// TODO(gauravsh): Should this be handled by a separate thread?
buffer_.push_back(std::make_pair(buffer, bytes_read));
« no previous file with comments | « no previous file | content/browser/loader/stream_resource_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698