diff options
Diffstat (limited to 'dix/enterleave.c')
-rw-r--r-- | dix/enterleave.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/dix/enterleave.c b/dix/enterleave.c index 54f4b8554..7f1f94165 100644 --- a/dix/enterleave.c +++ b/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) { |