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

Commit 206f65e7 authored by Ajay Panicker's avatar Ajay Panicker Committed by Andre Eisenbach
Browse files

[DO NOT MERGE] Prevent FDs from being leaked when accepted sockets are closed

Bug: 28672558
Change-Id: I4bc14bd7f098e34012c2ae1eeba2d439145901f0
parent da4a111e
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -196,6 +196,7 @@ public final class BluetoothSocket implements Closeable {
            as.close();
            as.close();
            throw new IOException("bt socket acept failed");
            throw new IOException("bt socket acept failed");
        }
        }
        as.mPfd = new ParcelFileDescriptor(fds[0]);
        as.mSocket = new LocalSocket(fds[0]);
        as.mSocket = new LocalSocket(fds[0]);
        as.mSocketIS = as.mSocket.getInputStream();
        as.mSocketIS = as.mSocket.getInputStream();
        as.mSocketOS = as.mSocket.getOutputStream();
        as.mSocketOS = as.mSocket.getOutputStream();