Fix adb get-serialno error handling

If pipe read fails, return.
This commit is contained in:
Romain Vimont 2021-11-25 21:35:07 +01:00
parent 3653fb6b15
commit b0eb1a55d6

View file

@ -304,6 +304,10 @@ adb_get_serialno(struct sc_intr *intr) {
return NULL;
}
if (r == -1) {
return false;
}
sc_str_truncate(buf, r, " \r\n");
return strdup(buf);