1
0
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:
david
2012-11-22 00:50:16 +00:00
parent 2419afabbd
commit f4ff002c71
2 changed files with 5 additions and 1 deletions

View File

@@ -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;
}