Merge "[Stability][hwui] check mmap return value"
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user