Skip to content

Commit

Permalink
Ooops, that's not good to leak...
Browse files Browse the repository at this point in the history
  • Loading branch information
poizan42 committed May 7, 2016
1 parent 0533a93 commit a7e2f1f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions soswow64/soswow64.c
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,10 @@ static HRESULT WINAPI HookGetExecutingProcessorType(

LPWSTR imageName = (LPWSTR)malloc(32768);
if (!GetMappedFileName(GetCurrentProcess(), caller, imageName, 32768))
{
free(imageName);
return RealGetExecutingProcessorType(dbgCtrl, Type);
}

LPWSTR filenamePart = wcsrchr(imageName, L'\\');
BOOL isSoS = filenamePart && _wcsicmp(filenamePart + 1, L"sos.dll") == 0;
Expand Down

0 comments on commit a7e2f1f

Please sign in to comment.