winealsa.drv: Fix missing unlock on the error path. Found by Smatch.

Michael Stefaniuc mstefani at redhat.de
Fri Jun 22 16:30:57 CDT 2007


Maarten,

is this the right fix or can the lock be moved below the 
     if (!This->pcm)
check?

bye
	michael
---
 dlls/winealsa.drv/dsoutput.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/dlls/winealsa.drv/dsoutput.c b/dlls/winealsa.drv/dsoutput.c
index 57b8968..9fc5020 100644
--- a/dlls/winealsa.drv/dsoutput.c
+++ b/dlls/winealsa.drv/dsoutput.c
@@ -459,6 +459,7 @@ static HRESULT WINAPI IDsDriverBufferImpl_GetPosition(PIDSDRIVERBUFFER iface,
     if (!This->pcm)
     {
         FIXME("Bad pointer for pcm: %p\n", This->pcm);
+        LeaveCriticalSection(&This->pcm_crst);
         return DSERR_GENERIC;
     }
 
-- 
1.5.0.6



More information about the wine-patches mailing list