Commit ea4c506c authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

windows.gaming.input: Fix a leak on error path (Coverity).

parent 631f4d5e
......@@ -335,6 +335,7 @@ static HRESULT async_info_create( IUnknown *invoker, IUnknown *param, async_oper
IInspectable *outer, IWineAsyncInfoImpl **out )
{
struct async_info *impl;
HRESULT hr;
if (!(impl = calloc( 1, sizeof(struct async_info) ))) return E_OUTOFMEMORY;
impl->IWineAsyncInfoImpl_iface.lpVtbl = &async_impl_vtbl;
......@@ -346,7 +347,11 @@ static HRESULT async_info_create( IUnknown *invoker, IUnknown *param, async_oper
impl->handler = HANDLER_NOT_SET;
impl->status = Started;
if (!(impl->async_run_work = CreateThreadpoolWork( async_info_callback, &impl->IWineAsyncInfoImpl_iface, NULL )))
return HRESULT_FROM_WIN32( GetLastError() );
{
hr = HRESULT_FROM_WIN32( GetLastError() );
free( impl );
return hr;
}
if ((impl->invoker = invoker)) IUnknown_AddRef( impl->invoker );
if ((impl->param = param)) IUnknown_AddRef( impl->param );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment