diff options
| author | 2019-01-07 21:22:46 -0800 | |
|---|---|---|
| committer | 2019-01-07 21:22:46 -0800 | |
| commit | a2b2a415f09fa02db6b93dfc8bc38ba4393fc2df (patch) | |
| tree | d237b0776d6845b005f04f8e8bd18d00d31b9fbe | |
| parent | 133f281d12771e1f54e41c8c5bab839c4ad66a7d (diff) | |
| parent | 9ebc299b734ee2babf1587ec9537c18dfc302dd0 (diff) | |
Merge "fix mmap leak of graphicsstats service"
am: 9ebc299b73
Change-Id: I6d13762a54bcf7417379c67385848e81e953ff2b
| -rw-r--r-- | libs/hwui/service/GraphicsStatsService.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libs/hwui/service/GraphicsStatsService.cpp b/libs/hwui/service/GraphicsStatsService.cpp index 3d50d2d7e59c..29e4256e2ab7 100644 --- a/libs/hwui/service/GraphicsStatsService.cpp +++ b/libs/hwui/service/GraphicsStatsService.cpp @@ -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; } |