diff options
author | 2014-07-13 23:10:23 +0000 | |
---|---|---|
committer | 2014-07-13 23:10:23 +0000 | |
commit | 9f6fb5c7f4fbd91f055bd858e78f5b372765ef8e (patch) | |
tree | c9a5c91f733f6bf4c568dc8afebb572c7a07312b /sys/dev/ic/osiop.c | |
parent | Split the context allocation out from the configuration. This will allow (diff) | |
download | wireguard-openbsd-9f6fb5c7f4fbd91f055bd858e78f5b372765ef8e.tar.xz wireguard-openbsd-9f6fb5c7f4fbd91f055bd858e78f5b372765ef8e.zip |
Some reallocarray() use; review Jean-Philippe Ouellet, patrick keshishian
ok tedu
Diffstat (limited to 'sys/dev/ic/osiop.c')
-rw-r--r-- | sys/dev/ic/osiop.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/ic/osiop.c b/sys/dev/ic/osiop.c index d933010bb12..9626df5a262 100644 --- a/sys/dev/ic/osiop.c +++ b/sys/dev/ic/osiop.c @@ -1,4 +1,4 @@ -/* $OpenBSD: osiop.c,v 1.48 2011/06/23 16:31:16 deraadt Exp $ */ +/* $OpenBSD: osiop.c,v 1.49 2014/07/13 23:10:23 deraadt Exp $ */ /* $NetBSD: osiop.c,v 1.9 2002/04/05 18:27:54 bouyer Exp $ */ /* @@ -267,7 +267,7 @@ osiop_attach(sc) /* * Allocate (malloc) memory for acb's. */ - acb = malloc(sizeof(*acb) * OSIOP_NACB, M_DEVBUF, M_NOWAIT | M_ZERO); + acb = mallocarray(OSIOP_NACB, sizeof(*acb), M_DEVBUF, M_NOWAIT | M_ZERO); if (acb == NULL) { printf(": can't allocate memory for acb\n"); return; |