diff options
Diffstat (limited to 'xserver/dix/grabs.c')
-rw-r--r-- | xserver/dix/grabs.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/xserver/dix/grabs.c b/xserver/dix/grabs.c index b92f1e7ce..2a307a2b9 100644 --- a/xserver/dix/grabs.c +++ b/xserver/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); |