mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-06 17:18:32 +00:00
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
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=358260
|
@ -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 a new issue