mirror of
https://github.com/nmap/nmap.git
synced 2025-12-06 04:31:29 +00:00
Avoid copying script results; store pointers instead.
This commit is contained in:
6
nmap.cc
6
nmap.cc
@@ -2025,8 +2025,7 @@ int nmap_main(int argc, char *argv[]) {
|
||||
printscriptresults(script_scan_results, SCRIPT_PRE_SCAN);
|
||||
for (ScriptResults::iterator it = script_scan_results->begin();
|
||||
it != script_scan_results->end(); it++) {
|
||||
ScriptResult sr = *it;
|
||||
sr.clear();
|
||||
delete (*it);
|
||||
}
|
||||
script_scan_results->clear();
|
||||
}
|
||||
@@ -2281,8 +2280,7 @@ int nmap_main(int argc, char *argv[]) {
|
||||
printscriptresults(script_scan_results, SCRIPT_POST_SCAN);
|
||||
for (ScriptResults::iterator it = script_scan_results->begin();
|
||||
it != script_scan_results->end(); it++) {
|
||||
ScriptResult sr = *it;
|
||||
sr.clear();
|
||||
delete (*it);
|
||||
}
|
||||
script_scan_results->clear();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user