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
This commit is contained in:
David 'Digit' Turner 2011-01-21 19:25:51 +01:00
parent c1b546b22d
commit b913b5170f

View file

@ -225,6 +225,7 @@ void SocketListener::runListener() {
}
pthread_mutex_unlock(&mClientsLock);
/* Destroy the client */
close(c->getSocket());
delete c;
}
}