From 0a2e233640e856fc843c63128b306740b3701904 Mon Sep 17 00:00:00 2001 From: Kirk McKusick Date: Tue, 24 Nov 1987 20:12:05 -0800 Subject: [PATCH] check for malloc failure znd zero memory (from jim%wind@bellcore.com) SCCS-vsn: sys/vax/vax/autoconf.c 7.11 --- usr/src/sys/vax/vax/autoconf.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/usr/src/sys/vax/vax/autoconf.c b/usr/src/sys/vax/vax/autoconf.c index 394e9b235d..440e9ef7af 100644 --- a/usr/src/sys/vax/vax/autoconf.c +++ b/usr/src/sys/vax/vax/autoconf.c @@ -3,7 +3,7 @@ * All rights reserved. The Berkeley software License Agreement * specifies the terms and conditions for redistribution. * - * @(#)autoconf.c 7.10 (Berkeley) %G% + * @(#)autoconf.c 7.11 (Berkeley) %G% */ /* @@ -644,6 +644,9 @@ unifind(uhp0, pumem) */ uhp->uh_map = (struct map *) malloc(UAMSIZ * sizeof (struct map), M_DEVBUF, M_NOWAIT); + if (uhp->uh_map == 0) + panic("no mem for unibus map"); + bzero(uhp->uh_map, UNAMSIZ * sizeof (struct map)); ubainitmaps(uhp); /* -- 2.20.1