summaryrefslogtreecommitdiff
path: root/usb
diff options
context:
space:
mode:
authorrickyniu <rickyniu@google.com>2018-04-16 11:43:49 +0800
committerraychi <raychi@google.com>2018-05-28 17:56:12 +0800
commite60e2e3e956d9a159450a5f875065283e6643d96 (patch)
treeae1dc08b438526562dc65bd135aaeab39877e122 /usb
parent0a630b87277fcb894af19741fbc152bbfdb2ea67 (diff)
Initialize booleans
Since mMonitorCreated wasnt initialized to false, join was called on the thread eventhough the thread didnt exist. (cherry-pick of commit: cb840d8de751e45daea008a7da912186a1884210) Bug: 77927124 Test: Booted asan and verified that adb was enabled. Change-Id: I6ff78b8d723892d2e33c2cdf99aa903a517e78c1 Signed-off-by: rickyniu <rickyniu@google.com>
Diffstat (limited to 'usb')
-rw-r--r--usb/UsbGadget.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/usb/UsbGadget.cpp b/usb/UsbGadget.cpp
index 5c1fb2d..e7cdcb5 100644
--- a/usb/UsbGadget.cpp
+++ b/usb/UsbGadget.cpp
@@ -164,7 +164,9 @@ static void *monitorFfs(void *param) {
return NULL;
}
-UsbGadget::UsbGadget() {
+UsbGadget::UsbGadget()
+ : mMonitorCreated(false),
+ mCurrentUsbFunctionsApplied(false) {
if (access(OS_DESC_PATH, R_OK) != 0)
ALOGE("configfs setup not done yet");
}