summaryrefslogtreecommitdiffstats
path: root/chrome/installer
diff options
context:
space:
mode:
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);
}