diff options
| author | 2018-09-05 18:16:46 +0000 | |
|---|---|---|
| committer | 2018-09-05 18:16:46 +0000 | |
| commit | 0b8f17b3ba65d9c8c59600eaa2b0e30dc032e91f (patch) | |
| tree | d43c92652753cd75a3198e41d2059b9aac24dc10 | |
| parent | e5440456ca3af4028586db679a89edfc2ae4fd4a (diff) | |
| parent | 3330d1208fc7cc43f133acd55e7e78aadfd64375 (diff) | |
Merge "statsd: fix double close."
| -rw-r--r-- | cmds/statsd/src/external/Perfetto.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cmds/statsd/src/external/Perfetto.cpp b/cmds/statsd/src/external/Perfetto.cpp index 05544837b752..c1f9a643e153 100644 --- a/cmds/statsd/src/external/Perfetto.cpp +++ b/cmds/statsd/src/external/Perfetto.cpp @@ -105,9 +105,9 @@ bool CollectPerfettoTraceAndUploadToDropbox(const PerfettoDetails& config, readPipe.reset(); // Close the read end (owned by the child process). - // Using fopen() because fwrite() has the right logic to chunking write() + // Using fdopen() because fwrite() has the right logic to chunking write() // over a pipe (see __sfvwrite()). - FILE* writePipeStream = fdopen(writePipe.get(), "wb"); + FILE* writePipeStream = android::base::Fdopen(std::move(writePipe), "wb"); if (!writePipeStream) { ALOGE("fdopen() failed while calling the Perfetto client: %s", strerror(errno)); return false; |