summaryrefslogtreecommitdiff
path: root/sbin/mount_portal
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2002-07-11 21:23:30 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2002-07-11 21:23:30 +0000
commit364af8a6959831d6abf08c4be270fc8fa36a3558 (patch)
tree209a46d0ba7282ded089f4ffe251892d7784dc03 /sbin/mount_portal
parent442fb3a9589843c4a2efce416f37fb12e8dddb5b (diff)
malloc() failure tests; rimshot@pandora.be
Diffstat (limited to 'sbin/mount_portal')
-rw-r--r--sbin/mount_portal/mount_portal.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sbin/mount_portal/mount_portal.c b/sbin/mount_portal/mount_portal.c
index 38dd40697cd..5f14c5740e7 100644
--- a/sbin/mount_portal/mount_portal.c
+++ b/sbin/mount_portal/mount_portal.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mount_portal.c,v 1.20 2002/05/26 09:24:35 deraadt Exp $ */
+/* $OpenBSD: mount_portal.c,v 1.21 2002/07/11 21:23:29 deraadt Exp $ */
/* $NetBSD: mount_portal.c,v 1.8 1996/04/13 01:31:54 jtc Exp $ */
/*
@@ -47,7 +47,7 @@ char copyright[] =
#if 0
static char sccsid[] = "@(#)mount_portal.c 8.6 (Berkeley) 4/26/95";
#else
-static char rcsid[] = "$OpenBSD: mount_portal.c,v 1.20 2002/05/26 09:24:35 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: mount_portal.c,v 1.21 2002/07/11 21:23:29 deraadt Exp $";
#endif
#endif /* not lint */
@@ -220,6 +220,8 @@ main(argc, argv)
fdssize = howmany(so+1, NFDBITS) * sizeof(fd_mask);
fdsp = (fd_set *)malloc(fdssize);
+ if (fdsp == NULL)
+ err(1, "malloc");
/*
* Just loop waiting for new connections and activating them