From 97dbccf5f254648fd96e011adeba0136af340658 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Hentschel?= Date: Wed, 24 Oct 2012 20:52:57 +0200 Subject: [PATCH] gameux: Avoid double free (coverity). --- dlls/gameux/gameexplorer.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dlls/gameux/gameexplorer.c b/dlls/gameux/gameexplorer.c index 1f51f12929f..8f306011022 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); + } } }