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

Commit 1c300861 authored by Josh Gao's avatar Josh Gao
Browse files

Fix memory leak in RenderThread::dumpGraphicsMemory.

This would have been a double-close of fd, except we just leak the
FILE* instead.

Test: treehugger
Change-Id: I519366fbcf0eb6f03f79c22abfa2b1b1b493a70a
parent 6bebb841
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -236,10 +236,8 @@ void RenderThread::dumpGraphicsMemory(int fd) {
            break;
    }

    FILE *file = fdopen(fd, "a");
    fprintf(file, "\n%s\n", cachesOutput.string());
    fprintf(file, "\nPipeline=%s\n", pipeline.string());
    fflush(file);
    dprintf(fd, "\n%s\n", cachesOutput.string());
    dprintf(fd, "\nPipeline=%s\n", pipeline.string());
}

Readback& RenderThread::readback() {