diff options
author | 2015-01-11 02:59:59 +0000 | |
---|---|---|
committer | 2015-01-11 02:59:59 +0000 | |
commit | 9429b8fb440280ccc4058ae9ba9fa3fafe94b8cd (patch) | |
tree | a036e0316798b1f331fbd197084c960c1babfc93 /sys/dev/usb/if_kue.c | |
parent | unnecessary cast (diff) | |
download | wireguard-openbsd-9429b8fb440280ccc4058ae9ba9fa3fafe94b8cd.tar.xz wireguard-openbsd-9429b8fb440280ccc4058ae9ba9fa3fafe94b8cd.zip |
KUE_MCFILTCNT() is non-constant, so use mallocarray()
Diffstat (limited to 'sys/dev/usb/if_kue.c')
-rw-r--r-- | sys/dev/usb/if_kue.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/usb/if_kue.c b/sys/dev/usb/if_kue.c index fc4503dd04c..4c8ce7f5da1 100644 --- a/sys/dev/usb/if_kue.c +++ b/sys/dev/usb/if_kue.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_kue.c,v 1.75 2014/12/22 02:28:52 tedu Exp $ */ +/* $OpenBSD: if_kue.c,v 1.76 2015/01/11 02:59:59 deraadt Exp $ */ /* $NetBSD: if_kue.c,v 1.50 2002/07/16 22:00:31 augustss Exp $ */ /* * Copyright (c) 1997, 1998, 1999, 2000 @@ -463,7 +463,7 @@ kue_attachhook(void *xsc) return; } - sc->kue_mcfilters = malloc(KUE_MCFILTCNT(sc) * ETHER_ADDR_LEN, + sc->kue_mcfilters = mallocarray(KUE_MCFILTCNT(sc), ETHER_ADDR_LEN, M_USBDEV, M_NOWAIT); if (sc->kue_mcfilters == NULL) { printf("%s: no memory for multicast filter buffer\n", |