diff options
Diffstat (limited to 'xorg-server/miext')
-rw-r--r-- | xorg-server/miext/damage/damage.c | 2 | ||||
-rw-r--r-- | xorg-server/miext/rootless/rootlessWindow.c | 4 | ||||
-rw-r--r-- | xorg-server/miext/shadow/shalloc.c | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/xorg-server/miext/damage/damage.c b/xorg-server/miext/damage/damage.c index 6ef7f9dfc..ce20169d4 100644 --- a/xorg-server/miext/damage/damage.c +++ b/xorg-server/miext/damage/damage.c @@ -1293,7 +1293,7 @@ damageText(DrawablePtr pDrawable, if (!checkGCDamage(pDrawable, pGC)) return; - charinfo = malloc(count * sizeof(CharInfoPtr)); + charinfo = xallocarray(count, sizeof(CharInfoPtr)); if (!charinfo) return; diff --git a/xorg-server/miext/rootless/rootlessWindow.c b/xorg-server/miext/rootless/rootlessWindow.c index a8f296a39..1f78e3f6c 100644 --- a/xorg-server/miext/rootless/rootlessWindow.c +++ b/xorg-server/miext/rootless/rootlessWindow.c @@ -949,7 +949,7 @@ StartFrameResize(WindowPtr pWin, Bool gravity, copy_rect_width = copy_rect.x2 - copy_rect.x1; copy_rect_height = copy_rect.y2 - copy_rect.y1; copy_rowbytes = ((copy_rect_width * Bpp) + 31) & ~31; - gResizeDeathBits = malloc(copy_rowbytes * copy_rect_height); + gResizeDeathBits = xallocarray(copy_rowbytes, copy_rect_height); if (copy_rect_width * copy_rect_height > rootless_CopyBytes_threshold && @@ -998,7 +998,7 @@ StartFrameResize(WindowPtr pWin, Bool gravity, RootlessStartDrawing(pWin); - gResizeDeathBits = malloc(winRec->bytesPerRow * winRec->height); + gResizeDeathBits = xallocarray(winRec->bytesPerRow, winRec->height); memcpy(gResizeDeathBits, winRec->pixelData, winRec->bytesPerRow * winRec->height); diff --git a/xorg-server/miext/shadow/shalloc.c b/xorg-server/miext/shadow/shalloc.c index e555135b9..6a79085c4 100644 --- a/xorg-server/miext/shadow/shalloc.c +++ b/xorg-server/miext/shadow/shalloc.c @@ -44,6 +44,6 @@ shadowAlloc(int width, int height, int bpp) /* Cant use PixmapBytePad -- the structure is probably not initialized yet */ stride = BitmapBytePad(width * bpp); - fb = malloc(stride * height); + fb = xallocarray(stride, height); return fb; } |