winex11.drv: fix a valgrind warning

Austin English austinenglish at gmail.com
Thu Jul 9 14:06:27 CDT 2009


Patch by John Reiser. Sent last year right before 1.0. See bug 14357.

-- 
-Austin
-------------- next part --------------
From 959e4efa606c0a2f11618928ada07424c5e2967e Mon Sep 17 00:00:00 2001
From: John Reiser <jreiser at BitWagon.com>
Date: Thu, 9 Jul 2009 13:40:09 -0500
Subject: [PATCH] winex11.drv: fix a valgrind warning

---
 dlls/winex11.drv/bitmap.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/dlls/winex11.drv/bitmap.c b/dlls/winex11.drv/bitmap.c
index facf405..1d616c8 100644
--- a/dlls/winex11.drv/bitmap.c
+++ b/dlls/winex11.drv/bitmap.c
@@ -324,6 +324,8 @@ LONG CDECL X11DRV_SetBitmapBits( HBITMAP hbitmap, const void *bits, LONG count )
         return 0;
     }
 
+    memset(image->data, 0, image->bytes_per_line * height);  /* valgrind */
+
     /* copy 16 bit padded image buffer with real bitsperpixel to XImage */
 
     startline = bits;
-- 
1.5.4.3


More information about the wine-patches mailing list