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

Commit 8a28df6f authored by Greg Kaiser's avatar Greg Kaiser
Browse files

Benchmark: Avoid potential memory leak

We make sure to close our FILE in all cases.

Test: TreeHugger
Bug: 147798079
Change-Id: I947adfc869466e89a70cc7ac63ef9c73e1a19ac2
parent 931d1554
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -94,10 +94,10 @@ bool BenchmarkTestEnvironment::writeStatsHeader() {
        return false;
    }
    int32_t numBytes = fwrite(statsHeader, sizeof(char), sizeof(statsHeader), fpStats);
    fclose(fpStats);
    if(numBytes != sizeof(statsHeader)) {
        return false;
    }
    fclose(fpStats);
    return true;
}