Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0b8f17b3 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "statsd: fix double close."

parents e5440456 3330d120
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -105,9 +105,9 @@ bool CollectPerfettoTraceAndUploadToDropbox(const PerfettoDetails& config,


    readPipe.reset();  // Close the read end (owned by the child process).
    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()).
    // over a pipe (see __sfvwrite()).
    FILE* writePipeStream = fdopen(writePipe.get(), "wb");
    FILE* writePipeStream = android::base::Fdopen(std::move(writePipe), "wb");
    if (!writePipeStream) {
    if (!writePipeStream) {
        ALOGE("fdopen() failed while calling the Perfetto client: %s", strerror(errno));
        ALOGE("fdopen() failed while calling the Perfetto client: %s", strerror(errno));
        return false;
        return false;