aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/dbe/midbe.c
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/dbe/midbe.c')
-rw-r--r--xorg-server/dbe/midbe.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/xorg-server/dbe/midbe.c b/xorg-server/dbe/midbe.c
index 8f759107a..9684d45bd 100644
--- a/xorg-server/dbe/midbe.c
+++ b/xorg-server/dbe/midbe.c
@@ -87,7 +87,7 @@ miDbeGetVisualInfo(ScreenPtr pScreen, XdbeScreenVisualInfo * pScrVisInfo)
}
/* Allocate an array of XdbeVisualInfo items. */
- if (!(visInfo = (XdbeVisualInfo *) malloc(count * sizeof(XdbeVisualInfo)))) {
+ if (!(visInfo = xallocarray(count, sizeof(XdbeVisualInfo)))) {
return FALSE; /* memory alloc failure */
}