commit | b92c8538453236b3bfb9f6b904b25ee079441b0b | [log] [tgz] |
---|---|---|
author | zhangkuili <zhangkuili@xiaomi.com> | Thu Jun 21 15:37:01 2018 -0700 |
committer | android-build-merger <android-build-merger@google.com> | Thu Jun 21 15:37:01 2018 -0700 |
tree | c24c2cfff8b23623de94cbd3bde2b244baf03cf9 | |
parent | cf0aa64ba63d2a62965eae5f9e17181203d52511 [diff] | |
parent | 4fe18f31d5c7a7984d0bd728eed5d9d3787b52cb [diff] |
Merge "[Stability][hwui] check mmap return value" am: b352dcd153 am: 399ac24bdf am: 4fe18f31d5 Change-Id: Id8e6045310f3b480649dbe097f60da2a293603d4
diff --git a/libs/hwui/service/GraphicsStatsService.cpp b/libs/hwui/service/GraphicsStatsService.cpp index 7f8cb2d..3d50d2d 100644 --- a/libs/hwui/service/GraphicsStatsService.cpp +++ b/libs/hwui/service/GraphicsStatsService.cpp
@@ -127,7 +127,7 @@ 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