summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Salyzyn2016-03-01 16:59:32 -0600
committerMark Salyzyn2016-03-02 13:37:21 -0600
commitc3484161980cdea915c893a233f54b14a75d151f (patch)
tree1c7b10e205efa8b2375fd82b4eabaee7fec9e621 /logd/LogTimes.cpp
parent539a79e5295e83ab1070de6082988f6b5fe7eae0 (diff)
downloadplatform-system-core-c3484161980cdea915c893a233f54b14a75d151f.tar.gz
platform-system-core-c3484161980cdea915c893a233f54b14a75d151f.tar.xz
platform-system-core-c3484161980cdea915c893a233f54b14a75d151f.zip
logd: clarify release_Locked() for static analyzer
(cherry pick from commit 0ecdec7a0922f5e99569c558fd3c6440b826e583) release_Locked() is called with a reference count and threadRunning, the static analyzer can not tell this and estimates that a call to delete this will occur. So let us invent a new call release_nodelete_Locked() to ensure it is clear we will not be arranging a delete this in the context of this code path. The delete this will follow in the immediate codepath in this function after threadRunning is cleared, and decRef_Locked() is called. Change will also remove any developer FUD regarding release_Locked() usage at this location. SideEffects: None Bug: 27434831 Change-Id: I91b060b2dadc72cc449fa381c934afb577bee037
Diffstat (limited to 'logd/LogTimes.cpp')
-rw-r--r--logd/LogTimes.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/logd/LogTimes.cpp b/logd/LogTimes.cpp
index a4b96d33d..2a04880e4 100644
--- a/logd/LogTimes.cpp
+++ b/logd/LogTimes.cpp
@@ -90,7 +90,7 @@ void LogTimeEntry::threadStop(void *obj) {
90 while(it != times.end()) { 90 while(it != times.end()) {
91 if (*it == me) { 91 if (*it == me) {
92 times.erase(it); 92 times.erase(it);
93 me->release_Locked(); 93 me->release_nodelete_Locked();
94 break; 94 break;
95 } 95 }
96 it++; 96 it++;