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/oosiop.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/oosiop.c')
-rw-r--r-- | sys/dev/ic/oosiop.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/ic/oosiop.c b/sys/dev/ic/oosiop.c index e47023b1331..00d0a58b976 100644 --- a/sys/dev/ic/oosiop.c +++ b/sys/dev/ic/oosiop.c @@ -1,4 +1,4 @@ -/* $OpenBSD: oosiop.c,v 1.21 2014/07/08 17:19:25 deraadt Exp $ */ +/* $OpenBSD: oosiop.c,v 1.22 2014/07/13 23:10:23 deraadt Exp $ */ /* $NetBSD: oosiop.c,v 1.4 2003/10/29 17:45:55 tsutsui Exp $ */ /* @@ -292,7 +292,7 @@ oosiop_alloc_cb(struct oosiop_softc *sc, int ncb) /* * Allocate oosiop_cb. */ - cb = malloc(sizeof(*cb) * ncb, M_DEVBUF, M_NOWAIT | M_ZERO); + cb = mallocarray(ncb, sizeof(*cb), M_DEVBUF, M_NOWAIT | M_ZERO); if (cb == NULL) { printf(": failed to allocate cb memory\n"); return (ENOMEM); |