diff --git a/src/mmap.c b/src/mmap.c index 8a0a2e3..9c631da 100644 --- a/src/mmap.c +++ b/src/mmap.c @@ -16,9 +16,9 @@ void *mmap (void *addr, size_t len, int prot, int flags, int fd, long long offs if ( NULL == buf ) return MAP_FAILED; if (lseek(fd,offset,SEEK_SET) != offset) return MAP_FAILED; - + count = read(fd, buf, len); - + if (count != len) { free (buf); return MAP_FAILED;