loader: alloc_pread() should set errno if malloc fails
We may want to find out why alloc_pread() failed.
This commit is contained in:
parent
fe20aaec0a
commit
91e697162c
@ -149,6 +149,7 @@ alloc_pread(int fd, off_t off, size_t len)
|
||||
#ifdef DEBUG
|
||||
printf("\nmalloc(%d) failed\n", (int)len);
|
||||
#endif
|
||||
errno = ENOMEM;
|
||||
return (NULL);
|
||||
}
|
||||
if (lseek(fd, off, SEEK_SET) == -1) {
|
||||
|
Loading…
Reference in New Issue
Block a user