aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/dix/enterleave.c
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/dix/enterleave.c')
-rw-r--r--xorg-server/dix/enterleave.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/xorg-server/dix/enterleave.c b/xorg-server/dix/enterleave.c
index 54f4b8554..7f1f94165 100644
--- a/xorg-server/dix/enterleave.c
+++ b/xorg-server/dix/enterleave.c
@@ -714,7 +714,7 @@ DeliverStateNotifyEvent(DeviceIntPtr dev, WindowPtr win)
}
}
- sev = ev = (deviceStateNotify *) malloc(evcount * sizeof(xEvent));
+ sev = ev = xallocarray(evcount, sizeof(xEvent));
FixDeviceStateNotify(dev, ev, NULL, NULL, NULL, first);
if (b != NULL) {