diff --git a/adb/daemon/usb.cpp b/adb/daemon/usb.cpp index 1e3701582..0a116abb3 100644 --- a/adb/daemon/usb.cpp +++ b/adb/daemon/usb.cpp @@ -310,11 +310,13 @@ struct UsbFfsConnection : public Connection { if (bound) { LOG(WARNING) << "received FUNCTIONFS_BIND while already bound?"; running = false; + break; } if (enabled) { LOG(WARNING) << "received FUNCTIONFS_BIND while already enabled?"; running = false; + break; } bound = true; @@ -324,11 +326,13 @@ struct UsbFfsConnection : public Connection { if (!bound) { LOG(WARNING) << "received FUNCTIONFS_ENABLE while not bound?"; running = false; + break; } if (enabled) { LOG(WARNING) << "received FUNCTIONFS_ENABLE while already enabled?"; running = false; + break; } enabled = true;