Commit 7860dd06 authored by Lorenzo Ferrillo's avatar Lorenzo Ferrillo Committed by Alexandre Julliard

ole32: Leave the RunningObjectTable Critical Section before umarshalling object.

Sometimes umarshalling an object from the RunningObjectTable can cause the routine to access the table back inside another thread, causing a deadlock. Visual Studio 2019 is an example of this behaviour. Signed-off-by: 's avatarLorenzo Ferrillo <lorenzofersteam@live.it>
parent 50da8767
......@@ -541,13 +541,14 @@ RunningObjectTableImpl_GetObject( IRunningObjectTable* iface,
{
IStream *pStream;
hr = create_stream_on_mip_ro(rot_entry->object, &pStream);
LeaveCriticalSection(&This->lock);
if (hr == S_OK)
{
hr = CoUnmarshalInterface(pStream, &IID_IUnknown, (void **)ppunkObject);
IStream_Release(pStream);
}
LeaveCriticalSection(&This->lock);
HeapFree(GetProcessHeap(), 0, moniker_data);
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