loader: alloc_pread() should set errno if malloc fails

We may want to find out why alloc_pread() failed.
This commit is contained in:
Toomas Soome 2020-02-23 15:21:15 +00:00
parent fe20aaec0a
commit 91e697162c
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=358260

View file

@ -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) {