[PATCH] dplayx: remove wrong HeapFree (Coverity)

Marcus Meissner marcus at jet.franken.de
Thu May 9 06:19:50 CDT 2013


CID 714010 Use after free

I do not know where they belong actually, but definitely not here.
Perhaps into the Set* method, but even there it looks incorrect.

Ciao, Marcus
---
 dlls/dplayx/dplaysp.c |    2 --
 1 file changed, 2 deletions(-)

diff --git a/dlls/dplayx/dplaysp.c b/dlls/dplayx/dplaysp.c
index 9a70901..899348e 100644
--- a/dlls/dplayx/dplaysp.c
+++ b/dlls/dplayx/dplaysp.c
@@ -384,13 +384,11 @@ static HRESULT WINAPI IDirectPlaySPImpl_GetSPPlayerData
   /* What to do in the case where there is nothing set yet? */
   if( dwFlags == DPSET_LOCAL )
   {
-    HeapFree( GetProcessHeap(), 0, lpPlayerData->lpPlayerLocalData );
     *lplpData     = lpPlayerData->lpPlayerLocalData;
     *lpdwDataSize = lpPlayerData->dwPlayerLocalDataSize;
   }
   else if( dwFlags == DPSET_REMOTE )
   {
-    HeapFree( GetProcessHeap(), 0, lpPlayerData->lpPlayerRemoteData );
     *lplpData     = lpPlayerData->lpPlayerRemoteData;
     *lpdwDataSize = lpPlayerData->dwPlayerRemoteDataSize;
   }
-- 
1.7.10.4




More information about the wine-patches mailing list