Andrew's git
/
gitweb.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
commit
grep
author
committer
pickaxe
?
re
[PATCH] Support for NO_OPENSSL
[gitweb.git]
/
tools
/
mailsplit.c
diff --git
a/tools/mailsplit.c
b/tools/mailsplit.c
index 9379fbc5e84983e5ea0754a6587cc3490c696c69..7b712081cbf812c551be536cddbbf563c570dc75 100644
(file)
--- a/
tools/mailsplit.c
+++ b/
tools/mailsplit.c
@@
-116,8
+116,9
@@
int main(int argc, char **argv)
}
size = st.st_size;
map = mmap(NULL, size, PROT_READ, MAP_PRIVATE, fd, 0);
- if (
-1 == (int)(long)map
) {
+ if (
map == MAP_FAILED
) {
perror("mmap");
+ close(fd);
exit(1);
}
close(fd);