summaryrefslogtreecommitdiff
path: root/miext/rootless
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2015-03-21 14:58:50 -0700
committerAlan Coopersmith <alan.coopersmith@oracle.com>2015-04-21 16:58:08 -0700
commit7ac280287491fe06127d9fefc504217e21c780e6 (patch)
treed86d2eb383f27378e6e6867fba3aa80290c7bd18 /miext/rootless
parent70f4a0e6bd18055cc9cb6685253bf5e07b125657 (diff)
Convert mi & miext to new *allocarray functions
v2: remove now useless parentheses Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Matt Turner <mattst88@gmail.com>
Diffstat (limited to 'miext/rootless')
-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);