summaryrefslogtreecommitdiff
path: root/dexlayout/dexlayout_main.cc
diff options
context:
space:
mode:
Diffstat (limited to 'dexlayout/dexlayout_main.cc')
-rw-r--r--dexlayout/dexlayout_main.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/dexlayout/dexlayout_main.cc b/dexlayout/dexlayout_main.cc
index d212e71f06..41b60da133 100644
--- a/dexlayout/dexlayout_main.cc
+++ b/dexlayout/dexlayout_main.cc
@@ -190,7 +190,7 @@ int DexlayoutDriver(int argc, char** argv) {
// Open profile file.
std::unique_ptr<ProfileCompilationInfo> profile_info;
if (options.profile_file_name_) {
- int profile_fd = open(options.profile_file_name_, O_RDONLY);
+ int profile_fd = open(options.profile_file_name_, O_RDONLY | O_CLOEXEC);
if (profile_fd < 0) {
PLOG(ERROR) << "Can't open " << options.profile_file_name_;
return 1;