Merge "fix mmap leak of graphicsstats service"
This commit is contained in:
@@ -139,6 +139,7 @@ bool GraphicsStatsService::parseFromFile(const std::string& path,
|
|||||||
uint32_t file_version = *reinterpret_cast<uint32_t*>(addr);
|
uint32_t file_version = *reinterpret_cast<uint32_t*>(addr);
|
||||||
if (file_version != sCurrentFileVersion) {
|
if (file_version != sCurrentFileVersion) {
|
||||||
ALOGW("file_version mismatch! expected %d got %d", sCurrentFileVersion, file_version);
|
ALOGW("file_version mismatch! expected %d got %d", sCurrentFileVersion, file_version);
|
||||||
|
munmap(addr, sb.st_size);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -150,6 +151,7 @@ bool GraphicsStatsService::parseFromFile(const std::string& path,
|
|||||||
ALOGW("Parse failed on '%s' error='%s'", path.c_str(),
|
ALOGW("Parse failed on '%s' error='%s'", path.c_str(),
|
||||||
output->InitializationErrorString().c_str());
|
output->InitializationErrorString().c_str());
|
||||||
}
|
}
|
||||||
|
munmap(addr, sb.st_size);
|
||||||
return success;
|
return success;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user