OSDN Git Service

android/ipc-tester: Fix possible double close
authorAndrei Emeltchenko <andrei.emeltchenko@intel.com>
Thu, 19 Jun 2014 13:55:28 +0000 (16:55 +0300)
committerJohan Hedberg <johan.hedberg@intel.com>
Mon, 23 Jun 2014 07:43:31 +0000 (10:43 +0300)
I case of error we may close fd and pipe twice.

android/ipc-tester.c

index f1f93f2..f23e4b6 100644 (file)
@@ -275,7 +275,7 @@ static void emulator(int pipe, int hci_index)
 
        close(pipe);
        close(fd);
-       bluetoothd_start(hci_index);
+       return bluetoothd_start(hci_index);
 
 failed:
        close(pipe);