commit | aa1141eca58b7bd2e82504ceea67f817ae0f14a2 | [log] [tgz] |
---|---|---|
author | Elliott Hughes <enh@google.com> | Tue Jun 30 21:47:21 2015 +0000 |
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | Tue Jun 30 21:47:21 2015 +0000 |
tree | 08aca987f8fdb49ee8bb2ec3b59a6e2590fc7fa2 | |
parent | 2749dc23f6006bf8902ad6333fe12a1a3c9281e0 [diff] | |
parent | 3ad22ae8da1d768af07aa682a8387677ccd85d83 [diff] |
Merge "Consistently use strerror in libutils."
diff --git a/adb/transport_local.cpp b/adb/transport_local.cpp index d3c4c30..97e3d50 100644 --- a/adb/transport_local.cpp +++ b/adb/transport_local.cpp
@@ -331,7 +331,11 @@ static void remote_close(atransport *t) { - adb_close(t->fd); + int fd = t->sfd; + if (fd != -1) { + t->sfd = -1; + adb_close(fd); + } }