winex11.drv: Fix two missing unlocks on error paths. Found by Smatch.

Michael Stefaniuc mstefani at redhat.de
Sat Oct 20 18:15:53 CDT 2007


---
 dlls/winex11.drv/window.c |   12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c
index 20ffe06..7348f2a 100644
--- a/dlls/winex11.drv/window.c
+++ b/dlls/winex11.drv/window.c
@@ -238,7 +238,11 @@ BOOL X11DRV_set_win_format( HWND hwnd, XID fbconfig_id )
     wine_tsx11_lock();
 
     vis = visual_from_fbconfig_id(fbconfig_id);
-    if(!vis) return FALSE;
+    if(!vis)
+    {
+        wine_tsx11_unlock();
+        return FALSE;
+    }
 
     if(data->whole_window && vis->visualid == XVisualIDFromVisual(visual))
     {
@@ -384,7 +388,11 @@ static void update_gl_drawable(Display *display, struct x11drv_win_data *data, c
     wine_tsx11_lock();
 
     vis = visual_from_fbconfig_id(data->fbconfig_id);
-    if(!vis) return;
+    if(!vis)
+    {
+        wine_tsx11_unlock();
+        return;
+    }
 
     pix = XCreatePixmap(display, parent, w, h, vis->depth);
     if(!pix)
-- 
1.5.3.4
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20071021/8f6b422d/attachment.pgp 


More information about the wine-patches mailing list