summaryrefslogtreecommitdiff
path: root/sys/dev/wscons/wsdisplay.c
diff options
context:
space:
mode:
authorAngelos D. Keromytis <angelos@cvs.openbsd.org>2001-05-24 04:12:05 +0000
committerAngelos D. Keromytis <angelos@cvs.openbsd.org>2001-05-24 04:12:05 +0000
commit5455500965bd9865310381d0ce0a530fb252293c (patch)
tree542b1c04cc7b47ec983530883589a4c06268206a /sys/dev/wscons/wsdisplay.c
parent7450dd3acf0959241423a6882f3f85c7442f4203 (diff)
Check malloc() return value, from tedu@heorot.stanford.edu
Diffstat (limited to 'sys/dev/wscons/wsdisplay.c')
-rw-r--r--sys/dev/wscons/wsdisplay.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/dev/wscons/wsdisplay.c b/sys/dev/wscons/wsdisplay.c
index 6b9a371bb86..e4e8109cb18 100644
--- a/sys/dev/wscons/wsdisplay.c
+++ b/sys/dev/wscons/wsdisplay.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: wsdisplay.c,v 1.28 2001/05/16 19:38:27 mickey Exp $ */
+/* $OpenBSD: wsdisplay.c,v 1.29 2001/05/24 04:12:04 angelos Exp $ */
/* $NetBSD: wsdisplay.c,v 1.37.4.1 2000/06/30 16:27:53 simonb Exp $ */
/*
@@ -280,6 +280,10 @@ wsscreen_attach(sc, console, emul, type, cookie, ccol, crow, defattr)
} else { /* not console */
dconf = malloc(sizeof(struct wsscreen_internal),
M_DEVBUF, M_NOWAIT);
+ if (dconf == NULL) {
+ free(scr, M_DEVBUF);
+ return (NULL);
+ }
dconf->emulops = type->textops;
dconf->emulcookie = cookie;
if (dconf->emulops) {