[INETCOMM_WINETEST] Sync with Wine Staging 2.9. CORE-13362

svn path=/trunk/; revision=74809
This commit is contained in:
Amine Khaldi 2017-06-03 22:27:55 +00:00
parent acfef1de4a
commit 60751dbf95

View file

@ -323,7 +323,12 @@ static ULONG WINAPI Stream_AddRef(IStream *iface)
static ULONG WINAPI Stream_Release(IStream *iface)
{
TestStream *This = impl_from_IStream(iface);
return InterlockedDecrement(&This->ref);
ULONG ref = InterlockedDecrement(&This->ref);
if (!ref)
HeapFree(GetProcessHeap(), 0, This);
return ref;
}
static HRESULT WINAPI Stream_Read(IStream *iface, void *pv, ULONG cb, ULONG *pcbRead)