winealsa.drv: Fix missing unlock on the error path. Found by
Smatch.
Maarten Lankhorst
m.b.lankhorst at gmail.com
Fri Jun 22 17:31:15 CDT 2007
That fix is correct, This->pcm is only ever changed inside the critical
section
Thanks,
Maarten
2007/6/22, Michael Stefaniuc <mstefani at redhat.de>:
> 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-devel
mailing list