diff options
4 files changed, 3 insertions, 28 deletions
diff --git a/chrome/browser/component_updater/component_unpacker.cc b/chrome/browser/component_updater/component_unpacker.cc index b8f90a7..8453df2 100644 --- a/chrome/browser/component_updater/component_unpacker.cc +++ b/chrome/browser/component_updater/component_unpacker.cc @@ -91,7 +91,7 @@ class CRXValidator { } const size_t kBufSize = 8 * 1024; - scoped_ptr<uint8> buf(new uint8[kBufSize]); + scoped_array<uint8> buf(new uint8[kBufSize]); while ((len = fread(buf.get(), 1, kBufSize, crx_file)) > 0) verifier.VerifyUpdate(buf.get(), len); @@ -208,4 +208,3 @@ ComponentUnpacker::~ComponentUnpacker() { file_util::Delete(unpack_path_, true); } } - diff --git a/chrome/browser/component_updater/component_updater_service_unittest.cc b/chrome/browser/component_updater/component_updater_service_unittest.cc index d65904c..83cda97 100644 --- a/chrome/browser/component_updater/component_updater_service_unittest.cc +++ b/chrome/browser/component_updater/component_updater_service_unittest.cc @@ -8,6 +8,7 @@ #include "base/file_path.h" #include "base/file_util.h" #include "base/path_service.h" +#include "base/values.h" #include "chrome/browser/component_updater/component_updater_interceptor.h" #include "chrome/common/chrome_paths.h" #include "chrome/common/chrome_notification_types.h" @@ -74,6 +75,7 @@ class TestInstaller : public ComponentInstaller { virtual bool Install(base::DictionaryValue* manifest, const FilePath& unpack_path) OVERRIDE { ++install_count_; + delete manifest; return file_util::Delete(unpack_path, true); } @@ -292,4 +294,3 @@ TEST_F(ComponentUpdaterTest, InstallCrx) { delete com2.installer; xmlCleanupGlobals(); } - diff --git a/tools/heapcheck/suppressions.txt b/tools/heapcheck/suppressions.txt index 9c774e1..4e219e3 100644 --- a/tools/heapcheck/suppressions.txt +++ b/tools/heapcheck/suppressions.txt @@ -1701,13 +1701,6 @@ fun:sync_api::SyncManager::SyncInternal::Init } { - bug_91486 - Heapcheck:Leak - ... - fun:::ReadManifest - fun:ComponentUnpacker::ComponentUnpacker -} -{ bug_91491 Heapcheck:Leak ... diff --git a/tools/valgrind/memcheck/suppressions.txt b/tools/valgrind/memcheck/suppressions.txt index 942ac89..70c972f 100644 --- a/tools/valgrind/memcheck/suppressions.txt +++ b/tools/valgrind/memcheck/suppressions.txt @@ -5178,24 +5178,6 @@ fun:_ZN8sync_api11SyncManager12SyncInternal4InitERK8FilePathRKN12browser_sync10WeakHandleINS5_14JsEventHandlerEEERKSsibPNS_23HttpPostProviderFactoryEPNS5_24ModelSafeWorkerRegistrarESC_RKNS_15SyncCredentialsEPN13sync_notifier12SyncNotifierESC_b } { - bug_91486_a - Memcheck:Leak - fun:_Znw* - ... - fun:_ZN12*ReadManifestERK8FilePath - fun:_ZN17ComponentUnpacker*ERKSt6vectorIhSaIhEERK8FilePathP18ComponentInstaller -} -{ - bug_91486_b - Memcheck:Free - fun:_ZdlPv - ... - fun:_ZN10scoped_ptrIhED1Ev - fun:_ZN12_GLOBAL__N_112CRXValidator* - ... - fun:_ZN17ComponentUnpackerC1ERKSt6vectorIhSaIhEERK8FilePathP18ComponentInstaller -} -{ bug_91491 Memcheck:Leak fun:_Znw* |