summaryrefslogtreecommitdiffstats
path: root/chrome/browser/thumbnail_store.cc
diff options
context:
space:
mode:
authorjhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-05 21:09:12 +0000
committerjhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-05 21:09:12 +0000
commita03f89d88b35b4fdd17aaa6a69234cd8263beee1 (patch)
treeccdefb79bd6390990d94c2ba44b25bc7a0190ec0 /chrome/browser/thumbnail_store.cc
parent522681a61b0e8bd18a2b76a228e9952cf40fd4f8 (diff)
downloadchromium_src-a03f89d88b35b4fdd17aaa6a69234cd8263beee1.zip
chromium_src-a03f89d88b35b4fdd17aaa6a69234cd8263beee1.tar.gz
chromium_src-a03f89d88b35b4fdd17aaa6a69234cd8263beee1.tar.bz2
Coverity: Allocate |cache| after we have a logic path where we can return and leak.
CID=6380 BUG=none TEST=none Review URL: http://codereview.chromium.org/255081 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28044 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/thumbnail_store.cc')
-rw-r--r--chrome/browser/thumbnail_store.cc3
1 files changed, 1 insertions, 2 deletions
diff --git a/chrome/browser/thumbnail_store.cc b/chrome/browser/thumbnail_store.cc
index 9a5b746..127ece5 100644
--- a/chrome/browser/thumbnail_store.cc
+++ b/chrome/browser/thumbnail_store.cc
@@ -370,13 +370,12 @@ void ThumbnailStore::InitializeFromDB(const FilePath& db_name,
}
void ThumbnailStore::GetAllThumbnailsFromDisk(MessageLoop* cb_loop) {
- Cache* cache = new Cache;
-
sql::Statement statement(db_.GetCachedStatement(SQL_FROM_HERE,
"SELECT * FROM thumbnails"));
if (!statement)
return;
+ Cache* cache = new Cache;
while (statement.Step()) {
// The URL
GURL url(statement.ColumnString(0));