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

Alexandre Julliard julliard at winehq.org
Mon Oct 22 09:55:22 CDT 2007


Module: wine
Branch: master
Commit: 4e2eef2b25a5350d91f76a09625c845195cc709b
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=4e2eef2b25a5350d91f76a09625c845195cc709b

Author: Michael Stefaniuc <mstefani at redhat.de>
Date:   Sun Oct 21 01:15:53 2007 +0200

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

---

 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)




More information about the wine-cvs mailing list