diff options
author | Doug Hogan <doug@cvs.openbsd.org> | 2014-12-09 07:05:07 +0000 |
---|---|---|
committer | Doug Hogan <doug@cvs.openbsd.org> | 2014-12-09 07:05:07 +0000 |
commit | 8f456837b1fba053042852c2b58706cec1ae226e (patch) | |
tree | 14aed88be4d213bba6895e0464371d1393be6c24 /sys/dev/usb/udl.c | |
parent | ad90d9845d96f21749e3776b0296938c6d60ca9a (diff) |
More malloc() -> mallocarray() in the kernel.
ok deraadt@ tedu@
Diffstat (limited to 'sys/dev/usb/udl.c')
-rw-r--r-- | sys/dev/usb/udl.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/usb/udl.c b/sys/dev/usb/udl.c index abe5400f833..167648e2cb2 100644 --- a/sys/dev/usb/udl.c +++ b/sys/dev/usb/udl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: udl.c,v 1.80 2014/07/12 18:48:52 tedu Exp $ */ +/* $OpenBSD: udl.c,v 1.81 2014/12/09 07:05:06 doug Exp $ */ /* * Copyright (c) 2009 Marcus Glocker <mglocker@openbsd.org> @@ -652,7 +652,7 @@ udl_alloc_screen(void *v, const struct wsscreen_descr *type, *curyp = 0; /* allocate character backing store */ - sc->sc_cbs = malloc((sc->sc_ri.ri_rows * sc->sc_ri.ri_cols) * + sc->sc_cbs = mallocarray(sc->sc_ri.ri_rows, sc->sc_ri.ri_cols * sizeof(*sc->sc_cbs), M_DEVBUF, M_NOWAIT|M_ZERO); if (sc->sc_cbs == NULL) { printf("%s: can't allocate mem for character backing store!\n", |