From 2a890d85e923e1da0331b02e58e95f98b11f5de0 Mon Sep 17 00:00:00 2001 From: Thomas Jaeger Date: Sun, 20 Sep 2009 01:31:59 -0400 Subject: fixes: Make sure invisible cursor is inialized with zero src/mask This fixes a regression introduced in 9040dab76182d1a019ca7fef7b29733d2c199e61. Signed-off-by: Thomas Jaeger Signed-off-by: Peter Hutterer --- xfixes/cursor.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'xfixes/cursor.c') diff --git a/xfixes/cursor.c b/xfixes/cursor.c index 0c706600e..aac90e393 100644 --- a/xfixes/cursor.c +++ b/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; -- cgit v1.2.3