xaudio2_7: Check return of IAudioClient_Start (Coverity)

Andrew Eikum aeikum at codeweavers.com
Tue Dec 22 13:03:14 CST 2015


Signed-off-by: Andrew Eikum <aeikum at codeweavers.com>

On Tue, Dec 22, 2015 at 07:34:57PM +0100, André Hentschel wrote:
> Signed-off-by: André Hentschel <nerv at dawncrow.de>
> ---
> CID 1339900
> 
>  dlls/xaudio2_7/xaudio_dll.c | 8 +++++++-
>  1 file changed, 7 insertions(+), 1 deletion(-)
> 
> diff --git a/dlls/xaudio2_7/xaudio_dll.c b/dlls/xaudio2_7/xaudio_dll.c
> index 04f975c..e7176b2 100644
> --- a/dlls/xaudio2_7/xaudio_dll.c
> +++ b/dlls/xaudio2_7/xaudio_dll.c
> @@ -1689,7 +1689,13 @@ static HRESULT WINAPI IXAudio2Impl_CreateMasteringVoice(IXAudio2 *iface,
>          goto exit;
>      }
>  
> -    IAudioClient_Start(This->aclient);
> +    hr = IAudioClient_Start(This->aclient);
> +    if (FAILED(hr))
> +    {
> +        WARN("Start(IAudioClient) failed: %08x\n", hr);
> +        hr = COMPAT_E_DEVICE_INVALIDATED(This->version);
> +        goto exit;
> +    }
>  
>      if(This->version <= 20)
>          *ppMasteringVoice = (IXAudio2MasteringVoice*)&This->IXAudio20MasteringVoice_iface;
> -- 
> 1.9.1
> 
> 
> 
> 



More information about the wine-patches mailing list