diff options
author | aa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-04 06:44:11 +0000 |
---|---|---|
committer | aa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-04 06:44:11 +0000 |
commit | a3a63ff836382403dc681befbd1cc866e8e5c117 (patch) | |
tree | 025880a374198fe6a44063f49d599c5fc96263cb /chrome | |
parent | 493a2620a018895d84569086f6c5e6ef3e627fd5 (diff) | |
download | chromium_src-a3a63ff836382403dc681befbd1cc866e8e5c117.zip chromium_src-a3a63ff836382403dc681befbd1cc866e8e5c117.tar.gz chromium_src-a3a63ff836382403dc681befbd1cc866e8e5c117.tar.bz2 |
Fix memory leak introduced by r22043.
BUG=18070
TEST=none
Review URL: http://codereview.chromium.org/160509
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22367 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/browser/extensions/extensions_service.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/chrome/browser/extensions/extensions_service.cc b/chrome/browser/extensions/extensions_service.cc index 7f2eb05..fe04e77 100644 --- a/chrome/browser/extensions/extensions_service.cc +++ b/chrome/browser/extensions/extensions_service.cc @@ -370,9 +370,9 @@ void ExtensionsService::OnExternalExtensionFound(const std::string& id, // version. This is important because these extensions are going to get // installed on every startup. Extension* existing = GetExtensionById(id); + scoped_ptr<Version> other(Version::GetVersionFromString(version)); if (existing) { - switch (existing->version()->CompareTo( - *Version::GetVersionFromString(version))) { + switch (existing->version()->CompareTo(*other)) { case -1: // existing version is older, we should upgrade break; case 0: // existing version is same, do nothing |