Michael Stefaniuc : winex11: Fix missing unlock & free on an error path ( Smatch).
Alexandre Julliard
julliard at winehq.org
Tue Dec 15 09:40:16 CST 2009
Module: wine
Branch: master
Commit: 32d0ef391164f9bea2eef14e3c85afd8b89acfdc
URL: http://source.winehq.org/git/wine.git/?a=commit;h=32d0ef391164f9bea2eef14e3c85afd8b89acfdc
Author: Michael Stefaniuc <mstefani at redhat.de>
Date: Tue Dec 15 00:27:27 2009 +0100
winex11: Fix missing unlock & free on an error path (Smatch).
---
dlls/winex11.drv/xrender.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/dlls/winex11.drv/xrender.c b/dlls/winex11.drv/xrender.c
index 2eb1d1e..1f5e512 100644
--- a/dlls/winex11.drv/xrender.c
+++ b/dlls/winex11.drv/xrender.c
@@ -2030,17 +2030,19 @@ BOOL CDECL X11DRV_AlphaBlend(X11DRV_PDEVICE *devDst, INT xDst, INT yDst, INT wid
dst_pict = get_xrender_picture(devDst);
wine_tsx11_lock();
- image = XCreateImage(gdi_display, visual, 32, ZPixmap, 0,
- (char*) data, widthSrc, heightSrc, 32, widthSrc * 4);
-
src_format = get_xrender_format(WXR_FORMAT_A8R8G8B8);
TRACE("src_format %p\n", src_format);
if(!src_format)
{
WARN("Unable to find a picture format supporting alpha, make sure X is running at 24-bit\n");
+ wine_tsx11_unlock();
+ HeapFree(GetProcessHeap(), 0, data);
return FALSE;
}
+ image = XCreateImage(gdi_display, visual, 32, ZPixmap, 0,
+ (char*) data, widthSrc, heightSrc, 32, widthSrc * 4);
+
TRACE("src_drawable = %08lx\n", devSrc->drawable);
xpm = XCreatePixmap(gdi_display,
root_window,
More information about the wine-cvs
mailing list