1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-06 04:31:29 +00:00

Prevent Connect scan leaking 1 socket per hostgroup. Fixes #3086

This commit is contained in:
dmiller
2025-06-13 20:57:15 +00:00
parent b8a344ca20
commit 3704a278be

View File

@@ -130,8 +130,11 @@ ConnectScanInfo::ConnectScanInfo() {
FD_ZERO(&fds_except);
}
/* Nothing really to do here. */
ConnectScanInfo::~ConnectScanInfo() {}
ConnectScanInfo::~ConnectScanInfo() {
if (nextSD >= 0) {
close(nextSD);
}
}
bool ConnectScanInfo::sendOK() {
if (numSDs >= maxSocketsAllowed)