summaryrefslogtreecommitdiffstats
path: root/usr.sbin/portsnap
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/portsnap')
-rw-r--r--usr.sbin/portsnap/make_index/make_index.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/usr.sbin/portsnap/make_index/make_index.c b/usr.sbin/portsnap/make_index/make_index.c
index 6139fad..fbb8dd9 100644
--- a/usr.sbin/portsnap/make_index/make_index.c
+++ b/usr.sbin/portsnap/make_index/make_index.c
@@ -116,6 +116,8 @@ makelist(char * str, size_t * n)
/* Allocate and fill an array */
d = malloc(*n * sizeof(DEP));
+ if (d == NULL)
+ err(1, "malloc(DEP)");
for (i = 0; i < *n; i++) {
d[i].name = strdup2(strsep(&str, " "));
OpenPOWER on IntegriCloud