mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-31 12:19:49 +00:00
dplayx: Fix some memory leaks.
This commit is contained in:
parent
6858ce73b6
commit
5ab977e2aa
2 changed files with 8 additions and 0 deletions
|
@ -3727,8 +3727,10 @@ static HRESULT WINAPI DirectPlay3AImpl_EnumConnections
|
|||
&sizeOfReturnBuffer ) != ERROR_SUCCESS )
|
||||
{
|
||||
ERR(": missing GUID registry data members\n" );
|
||||
RegCloseKey(hkServiceProvider);
|
||||
continue;
|
||||
}
|
||||
RegCloseKey(hkServiceProvider);
|
||||
|
||||
/* FIXME: Check return types to ensure we're interpreting data right */
|
||||
MultiByteToWideChar( CP_ACP, 0, returnBuffer, -1, buff, sizeof(buff)/sizeof(WCHAR) );
|
||||
|
@ -3822,8 +3824,10 @@ static HRESULT WINAPI DirectPlay3AImpl_EnumConnections
|
|||
&sizeOfReturnBuffer ) != ERROR_SUCCESS )
|
||||
{
|
||||
ERR(": missing GUID registry data members\n" );
|
||||
RegCloseKey(hkServiceProvider);
|
||||
continue;
|
||||
}
|
||||
RegCloseKey(hkServiceProvider);
|
||||
|
||||
/* FIXME: Check return types to ensure we're interpreting data right */
|
||||
MultiByteToWideChar( CP_ACP, 0, returnBuffer, -1, buff, sizeof(buff)/sizeof(WCHAR) );
|
||||
|
@ -3861,6 +3865,7 @@ static HRESULT WINAPI DirectPlay3AImpl_EnumConnections
|
|||
&dwAddressBufferSize, TRUE ) ) != DP_OK )
|
||||
{
|
||||
ERR( "can't create address: %s\n", DPLAYX_HresultToString( hr ) );
|
||||
HeapFree( GetProcessHeap(), 0, lpAddressBuffer );
|
||||
return hr;
|
||||
}
|
||||
|
||||
|
@ -3868,8 +3873,10 @@ static HRESULT WINAPI DirectPlay3AImpl_EnumConnections
|
|||
if( !lpEnumCallback( &serviceProviderGUID, lpAddressBuffer, dwAddressBufferSize,
|
||||
&dpName, DPCONNECTION_DIRECTPLAYLOBBY, lpContext ) )
|
||||
{
|
||||
HeapFree( GetProcessHeap(), 0, lpAddressBuffer );
|
||||
return DP_OK;
|
||||
}
|
||||
HeapFree( GetProcessHeap(), 0, lpAddressBuffer );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -136,6 +136,7 @@ void NS_AddRemoteComputerAsNameServer( LPCVOID lpcNSAddrHdr
|
|||
if( lpCacheNode->data == NULL )
|
||||
{
|
||||
ERR( "no memory for SESSIONDESC2\n" );
|
||||
HeapFree( GetProcessHeap(), 0, lpCacheNode );
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue