diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2015-01-11 03:07:45 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2015-01-11 03:07:45 +0000 |
commit | e8291be0618bd1a14eef9faabac0c6b10ab74ab5 (patch) | |
tree | 4363bfe36f8c546a5f699aedac86490e07a417a3 /sys | |
parent | 2983f86d385326c8838db8e90fdd4a08d85bd054 (diff) |
use mallocarray()
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/usb/ugen.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/usb/ugen.c b/sys/dev/usb/ugen.c index c09747e18df..29a9b22c242 100644 --- a/sys/dev/usb/ugen.c +++ b/sys/dev/usb/ugen.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ugen.c,v 1.79 2014/07/12 20:26:33 mpi Exp $ */ +/* $OpenBSD: ugen.c,v 1.80 2015/01/11 03:07:44 deraadt Exp $ */ /* $NetBSD: ugen.c,v 1.63 2002/11/26 18:49:48 christos Exp $ */ /* $FreeBSD: src/sys/dev/usb/ugen.c,v 1.26 1999/11/17 22:33:41 n_hibma Exp $ */ @@ -347,7 +347,7 @@ ugenopen(dev_t dev, int flag, int mode, struct proc *p) isize = UGETW(edesc->wMaxPacketSize); if (isize == 0) /* shouldn't happen */ return (EINVAL); - sce->ibuf = malloc(isize * UGEN_NISOFRAMES, + sce->ibuf = mallocarray(isize, UGEN_NISOFRAMES, M_USBDEV, M_WAITOK); sce->cur = sce->fill = sce->ibuf; sce->limit = sce->ibuf + isize * UGEN_NISOFRAMES; |