mirror of
https://github.com/debauchee/barrier.git
synced 2026-05-06 05:12:26 +08:00
Merge pull request #1350 from p12tic/fix-file-handles-leak
Fix file descriptor leak on incomplete connections [SECURITY VULNERABILITY CVE-2021-42075]
This commit is contained in:
@@ -194,6 +194,11 @@ ClientListener::handleUnknownClient(const Event&, void* vclient)
|
||||
new TMethodEventJob<ClientListener>(this,
|
||||
&ClientListener::handleClientDisconnected,
|
||||
client));
|
||||
} else {
|
||||
auto* stream = unknownClient->getStream();
|
||||
if (stream) {
|
||||
stream->close();
|
||||
}
|
||||
}
|
||||
|
||||
// now finished with unknown client
|
||||
|
||||
Reference in New Issue
Block a user