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 committed by Brad Fitzpatrick
parent 100c0e2dab
commit 15d09854a8
1 changed files with 1 additions and 0 deletions

View File

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