svn commit: r335181 - head/sbin/devmatch
John Baldwin
jhb at FreeBSD.org
Thu Jun 14 22:31:31 UTC 2018
Author: jhb
Date: Thu Jun 14 22:31:30 2018
New Revision: 335181
URL: https://svnweb.freebsd.org/changeset/base/335181
Log:
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
Modified:
head/sbin/devmatch/devmatch.c
Modified: head/sbin/devmatch/devmatch.c
==============================================================================
--- head/sbin/devmatch/devmatch.c Thu Jun 14 22:25:10 2018 (r335180)
+++ head/sbin/devmatch/devmatch.c Thu Jun 14 22:31:30 2018 (r335181)
@@ -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)
More information about the svn-src-all
mailing list