util.c: munmap takes a pointer, not a file descriptor.
The first argument to munmap(2) should be a pointer to an mmap'ed region, not a file descriptor. Signed-off-by: Dan Cross <patchdev@fat-dragon.org>
This commit is contained in:
parent
3519368d37
commit
69c7286ea7
@ -66,7 +66,7 @@ stralloc file2stralloc(const char *path) {
|
||||
}
|
||||
stralloc sa = EMPTY_STRALLOC;
|
||||
stralloc_copyb(&sa, p, len);
|
||||
munmap(fd, len);
|
||||
munmap(p, len);
|
||||
close(fd);
|
||||
|
||||
return sa;
|
||||
|
Reference in New Issue
Block a user