summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Josh Gao <jmgao@google.com> 2019-08-09 14:33:34 -0700
committer Josh Gao <jmgao@google.com> 2019-08-09 14:33:34 -0700
commit1197f7234dcad770dedc06ede58b37202ae2b780 (patch)
tree075c283e11c19b75f64635e10410b8a6b3aee57f
parent6f65b7f0dda9bbd70ca156487ac195821b4ff94b (diff)
installd_dexopt_test: fix close of owned file descriptor.
fdopen takes ownership of the file descriptor passed in, so the file descriptor must not be closed directly. Bug: http://b/139092341 Test: treehugger Change-Id: I1132bfe7b1b8bcea80fd264ae7832603cdec69cd
-rw-r--r--cmds/installd/tests/installd_dexopt_test.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/cmds/installd/tests/installd_dexopt_test.cpp b/cmds/installd/tests/installd_dexopt_test.cpp
index 73780eccbf..0212bc5564 100644
--- a/cmds/installd/tests/installd_dexopt_test.cpp
+++ b/cmds/installd/tests/installd_dexopt_test.cpp
@@ -275,7 +275,7 @@ protected:
writer.StartEntry("primary.prof", ZipWriter::kCompress);
writer.FinishEntry();
writer.Finish();
- close(fd);
+ fclose(file);
}
// Create the app user data.