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

Commit 6547dad5 authored by Josh Gao's avatar Josh Gao Committed by android-build-merger
Browse files

Merge "statsd: fix double close."

am: 0b8f17b3

Change-Id: Ic1069247cca9e3ea8b7ee6e1ba0d0d6e55a3e03b
parents 22ea0b7a 0b8f17b3
Loading
Loading
Loading
Loading
+2 −2
Original line number 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).

    // 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;