summaryrefslogtreecommitdiff
path: root/sys/dev/pci/arc.c
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2014-07-13 23:10:24 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2014-07-13 23:10:24 +0000
commit7ed78303cb18e6b98d376eb01f6a79bcf6211a0f (patch)
treeb074a2500bf5c87060c6ac6a7480e99344143a86 /sys/dev/pci/arc.c
parenteede121c340508412e23b0664274f4a9e38bc272 (diff)
Some reallocarray() use; review Jean-Philippe Ouellet, patrick keshishian
ok tedu
Diffstat (limited to 'sys/dev/pci/arc.c')
-rw-r--r--sys/dev/pci/arc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/pci/arc.c b/sys/dev/pci/arc.c
index bc569d83b96..b3e2170064b 100644
--- a/sys/dev/pci/arc.c
+++ b/sys/dev/pci/arc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: arc.c,v 1.102 2014/07/12 18:48:51 tedu Exp $ */
+/* $OpenBSD: arc.c,v 1.103 2014/07/13 23:10:23 deraadt Exp $ */
/*
* Copyright (c) 2006 David Gwynne <dlg@openbsd.org>
@@ -2618,7 +2618,7 @@ arc_create_sensors(void *xsc, void *arg)
}
sc->sc_nsensors = bi.bi_novol;
- sc->sc_sensors = malloc(sizeof(struct ksensor) * sc->sc_nsensors,
+ sc->sc_sensors = mallocarray(sc->sc_nsensors, sizeof(struct ksensor),
M_DEVBUF, M_WAITOK | M_ZERO);
strlcpy(sc->sc_sensordev.xname, DEVNAME(sc),