summaryrefslogtreecommitdiffstats
path: root/usr.sbin/config/mkmakefile.c
diff options
context:
space:
mode:
authorru <ru@FreeBSD.org>2010-03-30 13:46:40 +0000
committerru <ru@FreeBSD.org>2010-03-30 13:46:40 +0000
commit5562af42b475b5dd9510c3aae83fb5c13b2461aa (patch)
treea397f140c6755a88a4687730d41abc1141ca66c4 /usr.sbin/config/mkmakefile.c
parent09e7af977a9c3aa17fc324806c8ba6d8a7ab3c72 (diff)
downloadFreeBSD-src-5562af42b475b5dd9510c3aae83fb5c13b2461aa.zip
FreeBSD-src-5562af42b475b5dd9510c3aae83fb5c13b2461aa.tar.gz
- Handle calloc() allocation failures.
- Fixed a comment. - 2 -> EXIT_FAILURE in some places. - errx() -> err() where appropriate. PR: 144644 Submitted by: Garrett Cooper
Diffstat (limited to 'usr.sbin/config/mkmakefile.c')
-rw-r--r--usr.sbin/config/mkmakefile.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/usr.sbin/config/mkmakefile.c b/usr.sbin/config/mkmakefile.c
index a89db8e..f0d37fa 100644
--- a/usr.sbin/config/mkmakefile.c
+++ b/usr.sbin/config/mkmakefile.c
@@ -98,6 +98,8 @@ new_fent(void)
struct file_list *fp;
fp = (struct file_list *) calloc(1, sizeof *fp);
+ if (fp == NULL)
+ err(EXIT_FAILURE, "calloc");
STAILQ_INSERT_TAIL(&ftab, fp, f_next);
return (fp);
}
OpenPOWER on IntegriCloud