[PATCH] dplayx/tests: Fix memory leaks (valgrind)
Alistair Leslie-Hughes
leslie_alistair at hotmail.com
Tue Feb 21 23:15:02 CST 2017
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair at hotmail.com>
---
dlls/dplayx/dplay.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/dlls/dplayx/dplay.c b/dlls/dplayx/dplay.c
index cf6bd4a5f3..f4d934f174 100644
--- a/dlls/dplayx/dplay.c
+++ b/dlls/dplayx/dplay.c
@@ -245,6 +245,7 @@ static BOOL DP_DestroyDirectPlay2( LPVOID lpDP )
NS_DeleteSessionCache( This->dp2->lpNameServerData );
+ HeapFree( GetProcessHeap(), 0, This->dp2->dplspData.lpCB);
HeapFree( GetProcessHeap(), 0, This->dp2->lpSessionDesc );
IDirectPlaySP_Release( This->dp2->spData.lpISP );
@@ -4360,8 +4361,10 @@ static HRESULT WINAPI IDirectPlay4AImpl_EnumConnections( IDirectPlay4A *iface,
if( !lpEnumCallback( &serviceProviderGUID, lpAddressBuffer, dwAddressBufferSize,
&dpName, dwFlags, lpContext ) )
{
+ HeapFree( GetProcessHeap(), 0, lpAddressBuffer );
return DP_OK;
}
+ HeapFree( GetProcessHeap(), 0, lpAddressBuffer );
}
}
--
2.11.0
More information about the wine-patches
mailing list