Exit with an error if a linker hints file can't be found.

Continuing with a NULL hints variable just triggers a segfault later on.
The other error cases in this function all exit for an error rather than
warning.

Reviewed by:	imp
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D15579
This commit is contained in:
John Baldwin 2018-06-14 22:31:30 +00:00
parent 9293873e83
commit 44a230cd92
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=335181

View File

@ -120,12 +120,8 @@ read_linker_hints(void)
continue;
break;
}
if (q == NULL) {
warnx("Can't read linker hints file.");
free(hints);
hints = NULL;
return;
}
if (q == NULL)
errx(1, "Can't read linker hints file.");
} else {
hints = read_hints(linker_hints, &len);
if (hints == NULL)