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:
parent
9293873e83
commit
44a230cd92
@ -120,12 +120,8 @@ read_linker_hints(void)
|
|||||||
continue;
|
continue;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (q == NULL) {
|
if (q == NULL)
|
||||||
warnx("Can't read linker hints file.");
|
errx(1, "Can't read linker hints file.");
|
||||||
free(hints);
|
|
||||||
hints = NULL;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
hints = read_hints(linker_hints, &len);
|
hints = read_hints(linker_hints, &len);
|
||||||
if (hints == NULL)
|
if (hints == NULL)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user