mirror of
https://github.com/nmap/nmap.git
synced 2026-05-13 08:46:45 +00:00
Fix a memory leak when an address fails to resolve
This commit is contained in:
parent
5e47450bdc
commit
be6414dfea
1 changed files with 1 additions and 0 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue