Merge "statsd: fix double close." am: 0b8f17b3ba
am: 6547dad5ac
Change-Id: Ida7fc9c7f7e01d6993361c0734f71d1d13d97158
This commit is contained in:
4
cmds/statsd/src/external/Perfetto.cpp
vendored
4
cmds/statsd/src/external/Perfetto.cpp
vendored
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user