diff options
Diffstat (limited to 'xorg-server/Xext/sync.c')
-rw-r--r-- | xorg-server/Xext/sync.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/xorg-server/Xext/sync.c b/xorg-server/Xext/sync.c index ba08cd1bb..41405619c 100644 --- a/xorg-server/Xext/sync.c +++ b/xorg-server/Xext/sync.c @@ -620,7 +620,7 @@ SyncAwaitTriggerFired(SyncTrigger * pTrigger) pAwaitUnion = (SyncAwaitUnion *) pAwait->pHeader; numwaits = pAwaitUnion->header.num_waitconditions; - ppAwait = malloc(numwaits * sizeof(SyncAwait *)); + ppAwait = xallocarray(numwaits, sizeof(SyncAwait *)); if (!ppAwait) goto bail; @@ -1514,7 +1514,7 @@ SyncAwaitPrologue(ClientPtr client, int items) /* all the memory for the entire await list is allocated * here in one chunk */ - pAwaitUnion = malloc((items + 1) * sizeof(SyncAwaitUnion)); + pAwaitUnion = xallocarray(items + 1, sizeof(SyncAwaitUnion)); if (!pAwaitUnion) return NULL; |