aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/dix/grabs.c
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/dix/grabs.c')
-rw-r--r--xorg-server/dix/grabs.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/xorg-server/dix/grabs.c b/xorg-server/dix/grabs.c
index b92f1e7ce..2a307a2b9 100644
--- a/xorg-server/dix/grabs.c
+++ b/xorg-server/dix/grabs.c
@@ -594,10 +594,10 @@ DeletePassiveGrabFromList(GrabPtr pMinuendGrab)
i++;
if (!i)
return TRUE;
- deletes = malloc(i * sizeof(GrabPtr));
- adds = malloc(i * sizeof(GrabPtr));
- updates = malloc(i * sizeof(Mask **));
- details = malloc(i * sizeof(Mask *));
+ deletes = xallocarray(i, sizeof(GrabPtr));
+ adds = xallocarray(i, sizeof(GrabPtr));
+ updates = xallocarray(i, sizeof(Mask **));
+ details = xallocarray(i, sizeof(Mask *));
if (!deletes || !adds || !updates || !details) {
free(details);
free(updates);