commit | 4fe18f31d5c7a7984d0bd728eed5d9d3787b52cb | [log] [tgz] |
---|---|---|
author | zhangkuili <zhangkuili@xiaomi.com> | Thu Jun 21 15:04:48 2018 -0700 |
committer | android-build-merger <android-build-merger@google.com> | Thu Jun 21 15:04:48 2018 -0700 |
tree | 9100a5dab4a254dced346c33688d7a7ec2a8587b | |
parent | 2272f08724f287b640f468cfb2357148fca7a5e8 [diff] | |
parent | 399ac24bdfe0c06e04ff239bb77c57c6170ee074 [diff] |
Merge "[Stability][hwui] check mmap return value" am: b352dcd153 am: 399ac24bdf Change-Id: I4075c1d652eb645e2f7ab05ecdb66fda4636423e
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