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

mf: Set cancellation object directly (Coverity).

parent b2885d14
......@@ -760,17 +760,20 @@ static HRESULT WINAPI file_scheme_handler_BeginCreateObject(IMFSchemeHandler *if
hr = MFCreateAsyncResult(&context->IUnknown_iface, &handler->IMFAsyncCallback_iface, (IUnknown *)caller, &item);
IUnknown_Release(&context->IUnknown_iface);
IMFAsyncResult_Release(caller);
if (SUCCEEDED(hr))
{
if (SUCCEEDED(hr = MFPutWorkItemEx(MFASYNC_CALLBACK_QUEUE_IO, item)))
{
if (cancel_cookie)
IMFAsyncResult_GetState(item, cancel_cookie);
{
*cancel_cookie = (IUnknown *)caller;
IUnknown_AddRef(*cancel_cookie);
}
}
IMFAsyncResult_Release(item);
}
IMFAsyncResult_Release(caller);
return hr;
}
......
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