dplayx: Fix some memory leaks

Andrew Talbot andrew.talbot at talbotville.com
Sat Sep 22 09:40:15 CDT 2007


Changelog:
    dplayx: Fix some memory leaks.

diff --git a/dlls/dplayx/dplay.c b/dlls/dplayx/dplay.c
index 1688614..d65e647 100644
--- a/dlls/dplayx/dplay.c
+++ b/dlls/dplayx/dplay.c
@@ -3861,6 +3861,7 @@ static HRESULT WINAPI DirectPlay3AImpl_E
                                      &dwAddressBufferSize, TRUE ) ) != DP_OK )
       {
         ERR( "can't create address: %s\n", DPLAYX_HresultToString( hr ) );
+        HeapFree( GetProcessHeap(), 0, lpAddressBuffer );
         return hr;
       }
 
diff --git a/dlls/dplayx/name_server.c b/dlls/dplayx/name_server.c
index e875c19..1fdfef6 100644
--- a/dlls/dplayx/name_server.c
+++ b/dlls/dplayx/name_server.c
@@ -136,6 +136,7 @@ void NS_AddRemoteComputerAsNameServer( L
   if( lpCacheNode->data == NULL )
   {
     ERR( "no memory for SESSIONDESC2\n" );
+    HeapFree( GetProcessHeap(), 0, lpCacheNode );
     return;
   }
 



More information about the wine-patches mailing list