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

Commit eafbb21f authored by liulvping's avatar liulvping Committed by android-build-merger
Browse files

Merge "fix mmap leak of graphicsstats service" am: 9ebc299b am: a2b2a415

am: be2b5dab

Change-Id: I0507151e3394d6d599316b8b90e2fd50af20fdbe
parents e6baf1a4 be2b5dab
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -139,6 +139,7 @@ bool GraphicsStatsService::parseFromFile(const std::string& path,
    uint32_t file_version = *reinterpret_cast<uint32_t*>(addr);
    if (file_version != sCurrentFileVersion) {
        ALOGW("file_version mismatch! expected %d got %d", sCurrentFileVersion, file_version);
        munmap(addr, sb.st_size);
        return false;
    }

@@ -150,6 +151,7 @@ bool GraphicsStatsService::parseFromFile(const std::string& path,
        ALOGW("Parse failed on '%s' error='%s'", path.c_str(),
              output->InitializationErrorString().c_str());
    }
    munmap(addr, sb.st_size);
    return success;
}