aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/xfixes/cursor.c
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/xfixes/cursor.c')
-rw-r--r--xorg-server/xfixes/cursor.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/xorg-server/xfixes/cursor.c b/xorg-server/xfixes/cursor.c
index 0c706600e..aac90e393 100644
--- a/xorg-server/xfixes/cursor.c
+++ b/xorg-server/xfixes/cursor.c
@@ -1049,13 +1049,11 @@ createInvisibleCursor (void)
unsigned char *psrcbits, *pmaskbits;
CursorMetricRec cm;
- psrcbits = (unsigned char *) xalloc(4);
- pmaskbits = (unsigned char *) xalloc(4);
+ psrcbits = (unsigned char *) xcalloc(4, 1);
+ pmaskbits = (unsigned char *) xcalloc(4, 1);
if (psrcbits == NULL || pmaskbits == NULL) {
return NULL;
}
- *psrcbits = 0;
- *pmaskbits = 0;
cm.width = 1;
cm.height = 1;