Handle errors on munmap. It can fail too.
This commit is contained in:
parent
9d56979ded
commit
c19639a4ed
@ -34,8 +34,10 @@ reload(char **argv, int i)
|
|||||||
struct stat statbuf;
|
struct stat statbuf;
|
||||||
int fd;
|
int fd;
|
||||||
|
|
||||||
if (p[i] != NULL)
|
if (p[i] != NULL) {
|
||||||
munmap(p[i], 0x1000);
|
if (munmap(p[i], 0x1000) < 0)
|
||||||
|
err(1, "munmap: %s", argv[i]);
|
||||||
|
}
|
||||||
|
|
||||||
fd = open(argv[i], O_RDONLY, 0);
|
fd = open(argv[i], O_RDONLY, 0);
|
||||||
if (fd < 0)
|
if (fd < 0)
|
||||||
|
Loading…
Reference in New Issue
Block a user