From 603fcb3abf155e91fd3250f4a7aa16f289506e8e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rami=20Ylim=C3=A4ki?= Date: Sun, 18 Dec 2011 18:29:38 +0200 Subject: [PATCH] dri2: Initialize needInvalidate member of DRI2Drawable. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit If the client is not behaving correctly and swaps buffers before getting them, Valgrind will complain about uninitialized memory being used in DRI2InvalidateDrawable. Signed-off-by: Rami Ylimäki Reviewed-by: Ville Syrjälä Signed-off-by: Keith Packard --- hw/xfree86/dri2/dri2.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/xfree86/dri2/dri2.c b/hw/xfree86/dri2/dri2.c index 0d613be8e..d2035a4e6 100644 --- a/hw/xfree86/dri2/dri2.c +++ b/hw/xfree86/dri2/dri2.c @@ -181,6 +181,7 @@ DRI2AllocateDrawable(DrawablePtr pDraw) pPriv->last_swap_ust = 0; list_init(&pPriv->reference_list); pPriv->serialNumber = DRI2DrawableSerial(pDraw); + pPriv->needInvalidate = FALSE; if (pDraw->type == DRAWABLE_WINDOW) { pWin = (WindowPtr) pDraw;