summaryrefslogtreecommitdiffstats
path: root/chrome/installer
diff options
context:
space:
mode:
authorjhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-12-21 22:12:58 +0000
committerjhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-12-21 22:12:58 +0000
commita1923e617066da321821a8ccbdf0fbadd77d80de (patch)
treeb9d584225fb0ecd77e49493da2d6f80fd4a44186 /chrome/installer
parentb61c145d0b762e5ef324073091ba6a67f7fc71f0 (diff)
downloadchromium_src-a1923e617066da321821a8ccbdf0fbadd77d80de.zip
chromium_src-a1923e617066da321821a8ccbdf0fbadd77d80de.tar.gz
chromium_src-a1923e617066da321821a8ccbdf0fbadd77d80de.tar.bz2
Coverity: Fix leaks.
CID=2168,8197,8198,100251,100256,100820,101011,101982,101983,101984,101988, 102256 BUG=none TEST=none R=dpapad Review URL: http://codereview.chromium.org/8989036 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@115422 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/installer')
-rw-r--r--chrome/installer/util/google_chrome_distribution.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/chrome/installer/util/google_chrome_distribution.cc b/chrome/installer/util/google_chrome_distribution.cc
index 974bba5..b8bf4c5 100644
--- a/chrome/installer/util/google_chrome_distribution.cc
+++ b/chrome/installer/util/google_chrome_distribution.cc
@@ -100,8 +100,12 @@ int GetDirectoryWriteTimeInHours(const wchar_t* path) {
if (INVALID_HANDLE_VALUE == file)
return -1;
FILETIME time;
- if (!::GetFileTime(file, NULL, NULL, &time))
+ if (!::GetFileTime(file, NULL, NULL, &time)) {
+ ::CloseHandle(file);
return -1;
+ }
+
+ ::CloseHandle(file);
return FileTimeToHours(time);
}