From c8802d9f4abd7f212c85032fac14518ac19b04b2 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Thu, 29 Mar 2007 22:49:15 +0100 Subject: [PATCH] Clear the pixmaps on allocation. It appears to be an assumption that a Pixmap is ready for immediate use: ==15839== Conditional jump or move depends on uninitialised value(s) ==15839== at 0x809A0A9: fbBltOne (fbbltone.c:351) ==15839== by 0x80A8F91: fbPushFill (fbpush.c:152) ==15839== by 0x80A9153: fbPushImage (fbpush.c:214) ==15839== by 0x80A91F1: fbPushPixels (fbpush.c:244) ==15839== by 0x812C153: damagePushPixels (damage.c:1576) ==15839== by 0x80C56CD: miDCPutBits (midispcur.c:416) ==15839== by 0x80C5C06: miDCPutUpCursor (midispcur.c:506) ==15839== by 0x80D20E1: miSpriteRestoreCursor (misprite.c:794) ==15839== by 0x80CA99A: miPointerUpdateSprite (mipointer.c:343) ==15839== by 0x80CAAF4: miPointerDisplayCursor (mipointer.c:188) ==15839== by 0x80E038D: CursorDisplayCursor (cursor.c:136) ==15839== by 0x811EDC4: AnimCurDisplayCursor (animcur.c:234) ==15839== --- dix/pixmap.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dix/pixmap.c b/dix/pixmap.c index c280a3b..9c25b8e 100644 --- a/dix/pixmap.c +++ b/dix/pixmap.c @@ -118,7 +118,7 @@ AllocatePixmap(ScreenPtr pScreen, int pixDataSize) if (pScreen->totalPixmapSize > ((size_t)-1) - pixDataSize) return NullPixmap; - pPixmap = (PixmapPtr)xalloc(pScreen->totalPixmapSize + pixDataSize); + pPixmap = (PixmapPtr)xcalloc(1, pScreen->totalPixmapSize + pixDataSize); if (!pPixmap) return NullPixmap; ppriv = (DevUnion *)(pPixmap + 1); -- 1.4.4.2