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

Unified Diff: chrome/utility/chrome_content_utility_client.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 | « chrome/common/safe_browsing/zip_analyzer.cc ('k') | third_party/zlib/google/zip.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/utility/chrome_content_utility_client.cc
diff --git a/chrome/utility/chrome_content_utility_client.cc b/chrome/utility/chrome_content_utility_client.cc
index 4ee0fe9276a9345228338ca7e73acd075fbccd71..33adc50f1f6dc004dfb3e9b42e737956ab9aa8ef 100644
--- a/chrome/utility/chrome_content_utility_client.cc
+++ b/chrome/utility/chrome_content_utility_client.cc
@@ -251,6 +251,9 @@ void ChromeContentUtilityClient::OnCreateZipFile(
const base::FilePath& src_dir,
const std::vector<base::FilePath>& src_relative_paths,
const base::FileDescriptor& dest_fd) {
+ // dest_fd should be closed in the function. See ipc/ipc_message_util.h for
+ // details.
+ base::ScopedFD fd_closer(dest_fd.fd);
bool succeeded = true;
// Check sanity of source relative paths. Reject if path is absolute or
« no previous file with comments | « chrome/common/safe_browsing/zip_analyzer.cc ('k') | third_party/zlib/google/zip.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698