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

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

Merge "[Stability][hwui] check mmap return value"

parents faf31f86 24a1bc39
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -134,7 +134,7 @@ bool GraphicsStatsService::parseFromFile(const std::string& path, service::Graph
        return false;
    }
    void* addr = mmap(nullptr, sb.st_size, PROT_READ, MAP_SHARED, fd, 0);
    if (!addr) {
    if (addr == MAP_FAILED) {
        int err = errno;
        // The file not existing is normal for addToDump(), so only log if
        // we get an unexpected error