mirror of
https://github.com/reactos/wine.git
synced 2025-01-19 10:13:01 +00:00
inetcomm/tests: Fix test stream leak (Valgrind).
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
59103375b9
commit
8b67cfb8e4
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user