JobServer: fix socket leaks
Found by Coverity Scan, CID 25600. Change-Id: Ic0c549928ce8058c145d178ed06b41b543676460
This commit is contained in:
@ -152,6 +152,7 @@ void JobServer::run()
|
||||
/* Listen with a backlog of maxThreads */
|
||||
if (listen(s, m_maxThreads) == -1) {
|
||||
perror("listen");
|
||||
close(s);
|
||||
// TODO: Log-level?
|
||||
return;
|
||||
}
|
||||
@ -165,6 +166,7 @@ void JobServer::run()
|
||||
if (cs < 0) {
|
||||
if (errno != EWOULDBLOCK) {
|
||||
perror("poll/accept");
|
||||
close(s);
|
||||
// TODO: Log-level?
|
||||
return;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user