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

Commit 15d09854 authored by David 'Digit' Turner's avatar David 'Digit' Turner Committed by Brad Fitzpatrick
Browse files

libsysutils: Fix a file descriptor leak.

The recent refactoring of the select() loop in SocketListener
missed a close() of the file descriptor when the onDataAvailable()
callback returns false.

Change-Id: I767caefab4b98ab350f2db2497ee2bd630f20850
parent 100c0e2d
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -225,6 +225,7 @@ void SocketListener::runListener() {
                }
                pthread_mutex_unlock(&mClientsLock);
                /* Destroy the client */
                close(c->getSocket());
                delete c;
            }
        }