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

Commit 1b5bc6f8 authored by Dave Platt's avatar Dave Platt Committed by Android Git Automerger
Browse files

am bd9acc22: am e966e577: am 02f042dd: Fix socket descriptor leak from Zygote to child app

* commit 'bd9acc22':
  Fix socket descriptor leak from Zygote to child app
parents 105b545e bd9acc22
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -192,10 +192,16 @@ public class ZygoteInit {
    static void closeServerSocket() {
        try {
            if (sServerSocket != null) {
                FileDescriptor fd = sServerSocket.getFileDescriptor();
                sServerSocket.close();
                if (fd != null) {
                    Libcore.os.close(fd);
                }
            }
        } catch (IOException ex) {
            Log.e(TAG, "Zygote:  error closing sockets", ex);
        } catch (libcore.io.ErrnoException ex) {
            Log.e(TAG, "Zygote:  error closing descriptor", ex);
        }

        sServerSocket = null;