summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Roland Levillain <rpl@google.com> 2016-01-19 17:30:33 +0000
committer Roland Levillain <rpl@google.com> 2016-01-19 17:30:33 +0000
commit8d02644a351ab4b868a04b0ff39727cb83f06d8c (patch)
tree1358b39e029a732ea748e3478edb0cddfd24912e
parenta27d59b2b98a02b2e9e5dbe40623e7a97aa1e8d8 (diff)
mem_map_test: perform null check before dereferencing a pointer.
Bug: 26635783 Change-Id: I0bd29445b322b4c16b4f85a5acd9fac403d4fb6b
-rw-r--r--runtime/mem_map_test.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/runtime/mem_map_test.cc b/runtime/mem_map_test.cc
index edcbcf2dca..2f903c8a75 100644
--- a/runtime/mem_map_test.cc
+++ b/runtime/mem_map_test.cc
@@ -271,8 +271,8 @@ TEST_F(MemMapTest, MapAnonymousExactAddr32bitHighAddr) {
break;
}
}
- ASSERT_GE(reinterpret_cast<uintptr_t>(map->End()), 2u * GB);
ASSERT_TRUE(map.get() != nullptr) << error_msg;
+ ASSERT_GE(reinterpret_cast<uintptr_t>(map->End()), 2u * GB);
ASSERT_TRUE(error_msg.empty());
ASSERT_EQ(BaseBegin(map.get()), reinterpret_cast<void*>(start_addr));
}