mirror of
https://github.com/nmap/nmap.git
synced 2026-08-27 03:48:14 +00:00
Avoid copying script results; store pointers instead.
This commit is contained in:
parent
c3a2faaa7b
commit
f17fa67008
7 changed files with 38 additions and 34 deletions
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();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue