summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2015-06-04 06:07:24 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2015-06-04 06:07:24 +0000
commiteb824189c986b5d2a38388f471f697eb9066a498 (patch)
treee4a1a61a916a51f04513103d27fb05cf6901f783
parent90cf64e0e5bef1040754d436e605ecc9f22cb97e (diff)
use mallocarray instead of malloc in drm_calloc
-rw-r--r--sys/dev/pci/drm/drm_memory.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/pci/drm/drm_memory.c b/sys/dev/pci/drm/drm_memory.c
index 5ad6c599cb6..dedbc94e5e1 100644
--- a/sys/dev/pci/drm/drm_memory.c
+++ b/sys/dev/pci/drm/drm_memory.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: drm_memory.c,v 1.26 2014/07/12 18:48:52 tedu Exp $ */
+/* $OpenBSD: drm_memory.c,v 1.27 2015/06/04 06:07:23 jsg Exp $ */
/*-
*Copyright 1999 Precision Insight, Inc., Cedar Park, Texas.
* Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California.
@@ -55,7 +55,7 @@ drm_calloc(size_t nmemb, size_t size)
if (nmemb == 0 || SIZE_MAX / nmemb < size)
return (NULL);
else
- return malloc(size * nmemb, M_DRM, M_NOWAIT | M_ZERO);
+ return mallocarray(size, nmemb, M_DRM, M_NOWAIT | M_ZERO);
}
void *