| Index: sandbox/win/src/handle_table.cc
|
| diff --git a/sandbox/win/src/handle_table.cc b/sandbox/win/src/handle_table.cc
|
| index a497f7489091b4a0cdd0edeaa6d68ded4a562033..23217ddb76ac2c47e25ac46f3ebae7e76bfcdba4 100644
|
| --- a/sandbox/win/src/handle_table.cc
|
| +++ b/sandbox/win/src/handle_table.cc
|
| @@ -1,4 +1,4 @@
|
| -// Copyright (c) 2011 The Chromium Authors. All rights reserved.
|
| +// Copyright (c) 2013 The Chromium Authors. All rights reserved.
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| @@ -7,6 +7,7 @@
|
| #include <algorithm>
|
| #include <cstdlib>
|
|
|
| +#include "base/logging.h"
|
| #include "base/memory/scoped_ptr.h"
|
| #include "sandbox/win/src/win_utils.h"
|
|
|
| @@ -120,9 +121,10 @@ void HandleTable::HandleEntry::UpdateInfo(UpdateType flag) {
|
| case UPDATE_INFO_AND_NAME:
|
| if (type_info_buffer_.size() && handle_name_.empty()) {
|
| ULONG size = MAX_PATH;
|
| - scoped_ptr<UNICODE_STRING> name;
|
| + scoped_ptr<UNICODE_STRING, base::FreeDeleter> name;
|
| do {
|
| - name.reset(reinterpret_cast<UNICODE_STRING*>(new BYTE[size]));
|
| + name.reset(static_cast<UNICODE_STRING*>(malloc(size)));
|
| + CHECK(name.get());
|
| result = QueryObject(reinterpret_cast<HANDLE>(
|
| handle_entry_->Handle), ObjectNameInformation, name.get(),
|
| size, &size);
|
|
|