mirror of
git://source.winehq.org/git/wine.git
synced 2024-11-01 06:06:13 +00:00
windows.gaming.input: Fix a leak on error path (Coverity).
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
This commit is contained in:
parent
631f4d5e42
commit
ea4c506cd7
1 changed files with 6 additions and 1 deletions
|
@ -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 );
|
||||
|
|
Loading…
Reference in a new issue