Merge "[Stability][hwui] check mmap return value" am: b352dcd153
am: 399ac24bdf
Change-Id: I4075c1d652eb645e2f7ab05ecdb66fda4636423e
This commit is contained in:
@@ -127,7 +127,7 @@ bool GraphicsStatsService::parseFromFile(const std::string& path,
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
void* addr = mmap(nullptr, sb.st_size, PROT_READ, MAP_SHARED, fd, 0);
|
void* addr = mmap(nullptr, sb.st_size, PROT_READ, MAP_SHARED, fd, 0);
|
||||||
if (!addr) {
|
if (addr == MAP_FAILED) {
|
||||||
int err = errno;
|
int err = errno;
|
||||||
// The file not existing is normal for addToDump(), so only log if
|
// The file not existing is normal for addToDump(), so only log if
|
||||||
// we get an unexpected error
|
// we get an unexpected error
|
||||||
|
|||||||
Reference in New Issue
Block a user