aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/xfree86/dri/xf86dri.c
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/hw/xfree86/dri/xf86dri.c')
-rw-r--r--xorg-server/hw/xfree86/dri/xf86dri.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/xorg-server/hw/xfree86/dri/xf86dri.c b/xorg-server/hw/xfree86/dri/xf86dri.c
index 086e833ed..68f8b7e72 100644
--- a/xorg-server/hw/xfree86/dri/xf86dri.c
+++ b/xorg-server/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];