summaryrefslogtreecommitdiff
path: root/hw/xfree86/dri/xf86dri.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/xfree86/dri/xf86dri.c')
-rw-r--r--hw/xfree86/dri/xf86dri.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/xfree86/dri/xf86dri.c b/hw/xfree86/dri/xf86dri.c
index 086e833ed..68f8b7e72 100644
--- a/hw/xfree86/dri/xf86dri.c
+++ b/hw/xfree86/dri/xf86dri.c
@@ -422,7 +422,7 @@ ProcXF86DRIGetDrawableInfo(register ClientPtr client)
if (rep.numClipRects) {
/* Clip cliprects to screen dimensions (redirected windows) */
- pClippedRects = malloc(rep.numClipRects * sizeof(drm_clip_rect_t));
+ pClippedRects = xallocarray(rep.numClipRects, sizeof(drm_clip_rect_t));
if (pClippedRects) {
ScreenPtr pScreen = screenInfo.screens[stuff->screen];