ddraw: Add missing unlock on an error path (Smatch).

Michael Stefaniuc mstefani at redhat.de
Tue Sep 28 15:44:14 CDT 2010


---
 dlls/ddraw/ddraw.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/dlls/ddraw/ddraw.c b/dlls/ddraw/ddraw.c
index f3ebade..346c7c5 100644
--- a/dlls/ddraw/ddraw.c
+++ b/dlls/ddraw/ddraw.c
@@ -2947,6 +2947,7 @@ static HRESULT CreateSurface(IDirectDraw7 *iface,
     if((DDSD->ddsCaps.dwCaps & (DDSCAPS_BACKBUFFER | DDSCAPS_PRIMARYSURFACE)) == (DDSCAPS_BACKBUFFER | DDSCAPS_PRIMARYSURFACE))
     {
         WARN("Application wanted to create back buffer primary surface\n");
+        LeaveCriticalSection(&ddraw_cs);
         return DDERR_INVALIDCAPS;
     }
 
-- 
1.7.2.3



More information about the wine-patches mailing list