=?UTF-8?Q?Andr=C3=A9=20Hentschel=20?=: gameux: Avoid double free (coverity) .

Alexandre Julliard julliard at winehq.org
Thu Oct 25 13:50:44 CDT 2012


Module: wine
Branch: master
Commit: 97dbccf5f254648fd96e011adeba0136af340658
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=97dbccf5f254648fd96e011adeba0136af340658

Author: André Hentschel <nerv at dawncrow.de>
Date:   Wed Oct 24 20:52:57 2012 +0200

gameux: Avoid double free (coverity).

---

 dlls/gameux/gameexplorer.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/dlls/gameux/gameexplorer.c b/dlls/gameux/gameexplorer.c
index 1f51f12..8f30601 100644
--- a/dlls/gameux/gameexplorer.c
+++ b/dlls/gameux/gameexplorer.c
@@ -783,13 +783,15 @@ HRESULT GAMEUX_FindGameInstanceId(
                                              sConfigGDFBinaryPath, &lpValue);
 
                 if(SUCCEEDED(hr))
+                {
                     if(lstrcmpW(lpValue, sGDFBinaryPath)==0)
                     {
                         /* key found, let's copy instance id and exit */
                         hr = (GUIDFromStringW(lpName, pInstanceId) ? S_OK : E_FAIL);
                         found = TRUE;
                     }
-                HeapFree(GetProcessHeap(), 0, lpValue);
+                    HeapFree(GetProcessHeap(), 0, lpValue);
+                }
             }
         }
 




More information about the wine-cvs mailing list