mirror of
https://github.com/nmap/nmap.git
synced 2026-02-11 16:06:33 +00:00
Fix a memory leak when an address fails to resolve
This commit is contained in:
@@ -372,6 +372,7 @@ int TargetGroup::get_next_host(struct sockaddr_storage *ss, size_t *sslen) {
|
||||
this->netblock = netblock_hostname->resolve();
|
||||
if (this->netblock == NULL) {
|
||||
error("Failed to resolve \"%s\".", netblock_hostname->hostname.c_str());
|
||||
delete netblock_hostname;
|
||||
return -1;
|
||||
}
|
||||
delete netblock_hostname;
|
||||
|
||||
Reference in New Issue
Block a user