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

Michael Stefaniuc mstefani at redhat.de
Sat May 16 14:42:39 CDT 2009


---
 dlls/msvideo.dll16/msvideo16.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/dlls/msvideo.dll16/msvideo16.c b/dlls/msvideo.dll16/msvideo16.c
index ef2163f..a48a613 100644
--- a/dlls/msvideo.dll16/msvideo16.c
+++ b/dlls/msvideo.dll16/msvideo16.c
@@ -774,7 +774,11 @@ HIC16 VFWAPI ICOpenFunction16(DWORD fccType, DWORD fccHandler, UINT16 wMode, FAR
     struct msvideo_thunk*       thunk;
 
     EnterCriticalSection(&msvideo_cs);
-    if (!(thunk = MSVIDEO_AddThunk((DWORD)lpfnHandler))) return 0;
+    if (!(thunk = MSVIDEO_AddThunk((DWORD)lpfnHandler)))
+    {
+        LeaveCriticalSection(&msvideo_cs);
+        return 0;
+    }
     if ((hic32 = ICOpenFunction(fccType, fccHandler, wMode, IC_Callback3216)))
         thunk->hIC16 = HIC_16(hic32);
     else
-- 
1.6.3



More information about the wine-patches mailing list