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

Commit b913b517 authored by David 'Digit' Turner's avatar David 'Digit' Turner
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 c1b546b2
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;
            }
        }