| Index: net/disk_cache/entry_impl.cc
|
| diff --git a/net/disk_cache/entry_impl.cc b/net/disk_cache/entry_impl.cc
|
| index 67fa32b607a40c1afb3e82409e7bab9e926ff8ee..a1e0b327daabcad01a02908a520e68f1d9ffc71b 100644
|
| --- a/net/disk_cache/entry_impl.cc
|
| +++ b/net/disk_cache/entry_impl.cc
|
| @@ -861,15 +861,14 @@ bool EntryImpl::Flush(int index, int size, bool async) {
|
| if (async) {
|
| if (!file->PostWrite(user_buffers_[index].get(), len, offset))
|
| return false;
|
| + // The buffer is deleted from the PostWrite operation.
|
| + ignore_result(user_buffers_[index].release());
|
| } else {
|
| if (!file->Write(user_buffers_[index].get(), len, offset, NULL, NULL))
|
| return false;
|
| user_buffers_[index].reset(NULL);
|
| }
|
|
|
| - // The buffer is deleted from the PostWrite operation.
|
| - user_buffers_[index].release();
|
| -
|
| return true;
|
| }
|
|
|
| @@ -895,7 +894,7 @@ uint32 EntryImpl::GetEntryFlags() {
|
|
|
| void EntryImpl::GetData(int index, char** buffer, Addr* address) {
|
| if (user_buffers_[index].get()) {
|
| - // The data is already in memory, just copy it an we're done.
|
| + // The data is already in memory, just copy it and we're done.
|
| int data_len = entry_.Data()->data_size[index];
|
| DCHECK(data_len <= kMaxBlockSize);
|
| *buffer = new char[data_len];
|
|
|