summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Luis A. Lozano <llozano@google.com> 2017-06-06 16:59:37 -0700
committer Andreas Gampe <agampe@google.com> 2017-10-31 14:51:58 -0700
commit682e57b845a46c02bebd194a2689831f1b2b5948 (patch)
tree7b1f3f136976964442f2429c4e4fa4fa7cc6f1eb
parent42a57522c5c3ee645bf82d3090d308b9428e3e21 (diff)
Clean up possible null dereference warning.
Added a runtime check for the value of the pointer. (cherry picked from commit 88a69ded4ba00393e3865ccdfe65f964e58467b6) Bug: b/27101951 Test: verified warnings are gone. Merged-In: Ia1004ca6fdc0937450a72d680c02a79aab22a739 Change-Id: Ia1004ca6fdc0937450a72d680c02a79aab22a739
-rw-r--r--cmds/installd/CacheTracker.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/cmds/installd/CacheTracker.cpp b/cmds/installd/CacheTracker.cpp
index e293948caa..3eb39b9bed 100644
--- a/cmds/installd/CacheTracker.cpp
+++ b/cmds/installd/CacheTracker.cpp
@@ -148,6 +148,7 @@ void CacheTracker::loadItemsFrom(const std::string& path) {
}
// Bubble up modified time to parent
+ CHECK(p != nullptr);
switch (p->fts_info) {
case FTS_DP:
case FTS_DEFAULT: