summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorrvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-06 00:05:44 +0000
committerrvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-06 00:05:44 +0000
commit8ec3ace59651a1febdc76c162529be1c2bf9ad3d (patch)
treeb76e45ec4fca044fa4ca46e11dc0735f81c15c1e /net
parent41dc49d6bcb58c3605f0a9fc9e05c8d4616b10f6 (diff)
downloadchromium_src-8ec3ace59651a1febdc76c162529be1c2bf9ad3d.zip
chromium_src-8ec3ace59651a1febdc76c162529be1c2bf9ad3d.tar.gz
chromium_src-8ec3ace59651a1febdc76c162529be1c2bf9ad3d.tar.bz2
Fix a memory leak on the async resource handler.
BUG=7374 Review URL: http://codereview.chromium.org/20099 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9284 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net')
-rw-r--r--net/base/io_buffer.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/net/base/io_buffer.h b/net/base/io_buffer.h
index b390103..39399ad 100644
--- a/net/base/io_buffer.h
+++ b/net/base/io_buffer.h
@@ -5,6 +5,7 @@
#ifndef NET_BASE_IO_BUFFER_H_
#define NET_BASE_IO_BUFFER_H_
+#include "base/logging.h"
#include "base/ref_counted.h"
namespace net {
@@ -13,7 +14,9 @@ namespace net {
// easier asynchronous IO handling.
class IOBuffer : public base::RefCountedThreadSafe<IOBuffer> {
public:
+ IOBuffer() : data_(NULL) {}
explicit IOBuffer(int buffer_size) {
+ DCHECK(buffer_size);
data_ = new char[buffer_size];
}
explicit IOBuffer(char* buffer) : data_(buffer) {}