ole32: Disconnect the IRemUnknown stub buffer before destroying it to release the reference on the IRemUnknown object.

This commit is contained in:
Rob Shearman 2007-11-11 12:28:46 +00:00 committed by Alexandre Julliard
parent 8e51ab35be
commit 2779099319
1 changed files with 3 additions and 0 deletions

View File

@ -509,7 +509,10 @@ static ULONG WINAPI RemUnkStub_Release(LPRPCSTUBBUFFER iface)
TRACE("(%p)->Release()\n",This);
refs = InterlockedDecrement(&This->refs);
if (!refs)
{
IRpcStubBuffer_Disconnect(iface);
HeapFree(GetProcessHeap(), 0, This);
}
return refs;
}