diff options
author | Charles Longeau <chl@cvs.openbsd.org> | 2009-02-15 17:13:06 +0000 |
---|---|---|
committer | Charles Longeau <chl@cvs.openbsd.org> | 2009-02-15 17:13:06 +0000 |
commit | 694d3b25edcce3b25364d1d073f338dd6ac0b4d9 (patch) | |
tree | 5f05d2629e5906d2f9ccecf58745ed8010ae72cb /sys/dev | |
parent | 5071b5688f7fc8cf21016c592968c27a4edc242a (diff) |
do not check malloc return value against NULL, as M_WAITOK is used
ok krw@ miod@ (some months ago)
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/wsfont/wsfont.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/sys/dev/wsfont/wsfont.c b/sys/dev/wsfont/wsfont.c index 9543a043df7..3dee94a58d3 100644 --- a/sys/dev/wsfont/wsfont.c +++ b/sys/dev/wsfont/wsfont.c @@ -1,4 +1,4 @@ -/* $OpenBSD: wsfont.c,v 1.23 2008/06/26 05:42:19 ray Exp $ */ +/* $OpenBSD: wsfont.c,v 1.24 2009/02/15 17:13:05 chl Exp $ */ /* $NetBSD: wsfont.c,v 1.17 2001/02/07 13:59:24 ad Exp $ */ /*- @@ -297,8 +297,6 @@ wsfont_rotate_internal(struct wsdisplay_font *font) /* Duplicate the existing font... */ newfont = malloc(sizeof *font, M_DEVBUF, M_WAITOK); - if (newfont == NULL) - return (NULL); bcopy(font, newfont, sizeof *font); newfont->cookie = NULL; @@ -307,10 +305,6 @@ wsfont_rotate_internal(struct wsdisplay_font *font) newstride = (font->fontheight + 7) / 8; newbits = malloc(newstride * font->fontwidth * font->numchars, M_DEVBUF, M_WAITOK | M_ZERO); - if (newbits == NULL) { - free(newfont, M_DEVBUF); - return (NULL); - } /* Rotate the font a bit at a time. */ for (n = 0; n < font->numchars; n++) { |