summaryrefslogtreecommitdiff
path: root/utils/LocIpc.h
diff options
context:
space:
mode:
authorKevin Tang <zhikait@codeaurora.org>2019-01-11 17:41:30 -0800
committerKevin Tang <zhikait@codeaurora.org>2019-01-14 11:21:02 -0800
commitcd387d1e8eb7dbf07741005f0cf33677a911dd43 (patch)
tree878b89e1d253b430c79b0a20af562f8ca23ece75 /utils/LocIpc.h
parent63dca9043692387636fd8b8023129d1ef37b9df9 (diff)
downloadgps-cd387d1e8eb7dbf07741005f0cf33677a911dd43.tar.gz
LocIpc could be using data member from a deleted obj
startListeningBlocking is meant to be called under a reader thread, which is the case if startListeningNonBlocking calls it. A LocIpc client may delete the LocIpc obj, which would trigger sending an ABORT msg to the reader thread before it is subsequently deleted, in which case, it is possible that when the reader thread comes around to process the ABORT msg, referencing the data members of the possibly stale obj would cause unpredictable behaviors. Change-Id: I441af85c04d92b6fff695c020e3e0b4bd5e90409 CRs-Fixed: 2380093
Diffstat (limited to 'utils/LocIpc.h')
-rw-r--r--utils/LocIpc.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/utils/LocIpc.h b/utils/LocIpc.h
index a1a994d..87f2ff8 100644
--- a/utils/LocIpc.h
+++ b/utils/LocIpc.h
@@ -44,7 +44,7 @@ class LocIpcSender;
class LocIpc {
friend LocIpcSender;
public:
- inline LocIpc() : mIpcFd(-1), mStopRequested(false), mRunnable(nullptr) {}
+ inline LocIpc() : mIpcFd(-1), mRunnable(nullptr) {}
inline virtual ~LocIpc() { stopListening(); }
// Listen for new messages in current thread. Calling this funciton will
@@ -93,7 +93,6 @@ private:
const uint8_t data[], uint32_t length);
int mIpcFd;
- bool mStopRequested;
LocThread mThread;
LocRunnable *mRunnable;
};