diff options
Diffstat (limited to 'sys/dev/rd.c')
-rw-r--r-- | sys/dev/rd.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/rd.c b/sys/dev/rd.c index bf2f63715e8..b37decb3e6b 100644 --- a/sys/dev/rd.c +++ b/sys/dev/rd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rd.c,v 1.7 2014/07/12 18:48:51 tedu Exp $ */ +/* $OpenBSD: rd.c,v 1.8 2014/07/13 23:10:23 deraadt Exp $ */ /* * Copyright (c) 2011 Matthew Dempsky <matthew@dempsky.org> @@ -88,7 +88,7 @@ rdattach(int num) cf.cf_driver = &rd_cd; rd_cd.cd_ndevs = num; - rd_cd.cd_devs = malloc(num * sizeof(void *), M_DEVBUF, M_NOWAIT); + rd_cd.cd_devs = mallocarray(num, sizeof(void *), M_DEVBUF, M_NOWAIT); if (rd_cd.cd_devs == NULL) panic("rdattach: out of memory"); |