mirror of
https://github.com/nmap/nmap.git
synced 2025-12-06 04:31:29 +00:00
NOLUA guard in Port::freeScriptResults.
This commit is contained in:
@@ -146,10 +146,12 @@ void Port::freeService(bool del_service) {
|
|||||||
|
|
||||||
void Port::freeScriptResults(void)
|
void Port::freeScriptResults(void)
|
||||||
{
|
{
|
||||||
|
#ifndef NOLUA
|
||||||
while (!scriptResults.empty()) {
|
while (!scriptResults.empty()) {
|
||||||
scriptResults.front().clear();
|
scriptResults.front().clear();
|
||||||
scriptResults.pop_front();
|
scriptResults.pop_front();
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Fills in namebuf (as long as there is space in buflen) with the
|
/* Fills in namebuf (as long as there is space in buflen) with the
|
||||||
@@ -456,9 +458,7 @@ PortList::~PortList() {
|
|||||||
for(i=0; i < port_list_count[proto]; i++) { // free every Port
|
for(i=0; i < port_list_count[proto]; i++) { // free every Port
|
||||||
if(port_list[proto][i]) {
|
if(port_list[proto][i]) {
|
||||||
port_list[proto][i]->freeService(true);
|
port_list[proto][i]->freeService(true);
|
||||||
#ifndef NOLUA
|
|
||||||
port_list[proto][i]->freeScriptResults();
|
port_list[proto][i]->freeScriptResults();
|
||||||
#endif
|
|
||||||
delete port_list[proto][i];
|
delete port_list[proto][i];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user