diff options
author | Doug Hogan <doug@cvs.openbsd.org> | 2014-12-13 21:05:34 +0000 |
---|---|---|
committer | Doug Hogan <doug@cvs.openbsd.org> | 2014-12-13 21:05:34 +0000 |
commit | 80be619ed8893c124ce97f593c5d53c819023c7e (patch) | |
tree | 77561bf790a4f667f18e5d99327b02c906f29183 /sys/kern/subr_log.c | |
parent | 2bef9f90fd3a945ab3c0b8e3685da6dad3ca246f (diff) |
yet more mallocarray() changes.
ok tedu@ deraadt@
Diffstat (limited to 'sys/kern/subr_log.c')
-rw-r--r-- | sys/kern/subr_log.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/kern/subr_log.c b/sys/kern/subr_log.c index 6603f7d24a2..ec1e2ebb850 100644 --- a/sys/kern/subr_log.c +++ b/sys/kern/subr_log.c @@ -1,4 +1,4 @@ -/* $OpenBSD: subr_log.c,v 1.24 2014/12/10 02:44:47 tedu Exp $ */ +/* $OpenBSD: subr_log.c,v 1.25 2014/12/13 21:05:33 doug Exp $ */ /* $NetBSD: subr_log.c,v 1.11 1996/03/30 22:24:44 christos Exp $ */ /* @@ -369,9 +369,10 @@ sys_sendsyslog(struct proc *p, void *v, register_t *retval) auio.uio_resid = aiov.iov_len; #ifdef KTRACE if (KTRPOINT(p, KTR_GENIO)) { + ktriov = mallocarray(auio.uio_iovcnt, sizeof(struct iovec), + M_TEMP, M_WAITOK); iovlen = auio.uio_iovcnt * sizeof (struct iovec); - ktriov = malloc(iovlen, M_TEMP, M_WAITOK); memcpy(ktriov, auio.uio_iov, iovlen); } #endif |