[PATCH] dsound: Add missing SetEventHandle error handling (Coverity).

Andrew Eikum aeikum at codeweavers.com
Mon Feb 25 07:48:23 CST 2019


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

On Fri, Feb 22, 2019 at 02:03:13PM +0100, Sven Baars wrote:
> Signed-off-by: Sven Baars <sven.wine at gmail.com>
> ---
>  dlls/dsound/primary.c | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/dlls/dsound/primary.c b/dlls/dsound/primary.c
> index a30fc5e0a5..9f41a2b47f 100644
> --- a/dlls/dsound/primary.c
> +++ b/dlls/dsound/primary.c
> @@ -319,7 +319,11 @@ HRESULT DSOUND_ReopenDevice(DirectSoundDevice *device, BOOL forcewave)
>          return hres;
>      }
>  
> -    IAudioClient_SetEventHandle(client, device->sleepev);
> +    hres = IAudioClient_SetEventHandle(client, device->sleepev);
> +    if (FAILED(hres)) {
> +        WARN("SetEventHandle failed: %08x\n", hres);
> +        goto err;
> +    }
>  
>      hres = IAudioClient_GetService(client, &IID_IAudioRenderClient, (void**)&render);
>      if(FAILED(hres))
> -- 
> 2.17.1
> 
> 
> 



More information about the wine-devel mailing list