summaryrefslogtreecommitdiff
path: root/miext/rootless/rootlessWindow.c
diff options
context:
space:
mode:
Diffstat (limited to 'miext/rootless/rootlessWindow.c')
-rw-r--r--miext/rootless/rootlessWindow.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/miext/rootless/rootlessWindow.c b/miext/rootless/rootlessWindow.c
index a8f296a39..1f78e3f6c 100644
--- a/miext/rootless/rootlessWindow.c
+++ b/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);