Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5b65f86a authored by Elliott Hughes's avatar Elliott Hughes
Browse files

Backport missing null check in "adb get-state".

Bug: https://code.google.com/p/android/issues/detail?id=184011
Bug: http://b/23709037
Change-Id: Ia33814bd2adc310c2471cd6a12b9a73f27d77182
parent 46603db5
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -919,7 +919,7 @@ int handle_host_request(char *service, transport_type ttype, char* serial, int r
    if(!strncmp(service,"get-state",strlen("get-state"))) {
        transport = acquire_one_transport(CS_ANY, ttype, serial, NULL);
        SendOkay(reply_fd);
        SendProtocolString(reply_fd, transport->connection_state_name());
        SendProtocolString(reply_fd, transport ? transport->connection_state_name() : "unknown");
        return 0;
    }
#endif // ADB_HOST