OSDN Git Service

Fix double close in btif.cc's dump.
authorJosh Gao <jmgao@google.com>
Tue, 26 Jun 2018 21:01:06 +0000 (14:01 -0700)
committerJosh Gao <jmgao@google.com>
Tue, 26 Jun 2018 21:07:50 +0000 (14:07 -0700)
dump closes a file descriptor that is still owned by a
ParcelFileDescriptor which leads eventually to a double close.

Test: treehugger
Change-Id: Id351b5429cb17b48e37313850a363d739d78c4a1

btif/src/bluetooth.cc

index 94dc108..4fb8f64 100644 (file)
@@ -326,8 +326,6 @@ static void dump(int fd, const char** arguments) {
 #if (BTSNOOP_MEM == TRUE)
   btif_debug_btsnoop_dump(fd);
 #endif
-
-  close(fd);
 }
 
 static void dumpMetrics(std::string* output) {