mirror of
https://github.com/nmap/nmap.git
synced 2025-12-15 20:29:03 +00:00
Warn on failure of munmap.
Patch based on one by Bill Parker. http://seclists.org/nmap-dev/2012/q4/261
This commit is contained in:
4
nmap.cc
4
nmap.cc
@@ -2336,7 +2336,9 @@ int gather_logfile_resumption_state(char *fname, int *myargc, char ***myargv) {
|
||||
|
||||
/* Ensure the log file ends with a newline */
|
||||
filestr[filelen - 1] = '\n';
|
||||
munmap(filestr, filelen);
|
||||
if (munmap(filestr, filelen) != 0)
|
||||
gh_perror("%s: error in munmap(%p, %u)", __func__, filestr, filelen);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user