Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(999)

Unified Diff: chrome/common/safe_browsing/zip_analyzer.cc

Issue 683913009: Eliminate resource leaks from zip::ZipFiles and (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebasing Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « AUTHORS ('k') | chrome/utility/chrome_content_utility_client.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/safe_browsing/zip_analyzer.cc
diff --git a/chrome/common/safe_browsing/zip_analyzer.cc b/chrome/common/safe_browsing/zip_analyzer.cc
index 105fb2bf34d9eb5dfbad2f9f88db9c7fe3475f03..d2ce62513eb8039a1c50e91d8a2faff4eb3176ce 100644
--- a/chrome/common/safe_browsing/zip_analyzer.cc
+++ b/chrome/common/safe_browsing/zip_analyzer.cc
@@ -13,10 +13,7 @@ namespace zip_analyzer {
void AnalyzeZipFile(base::File zip_file, Results* results) {
zip::ZipReader reader;
- // OpenFromPlatformFile may close the handle even when it fails, but there is
- // no way to know if it did that or not. Assume it did (that's the common
- // case).
- if (!reader.OpenFromPlatformFile(zip_file.TakePlatformFile())) {
+ if (!reader.OpenFromPlatformFile(zip_file.GetPlatformFile())) {
DVLOG(1) << "Failed to open zip file";
return;
}
« no previous file with comments | « AUTHORS ('k') | chrome/utility/chrome_content_utility_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698