1
0
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:
dmiller
2015-06-30 13:08:30 +00:00
parent 5e47450bdc
commit be6414dfea

View File

@@ -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;