MZ_Exec() patch, try 3

Dmitry Timoshkov dmitry at baikal.ru
Mon Oct 21 19:52:09 CDT 2002


"Chris Morgan" <cmorgan at alum.wpi.edu> wrote:

> + hFile = CreateFileA( filename, GENERIC_READ, FILE_SHARE_READ,
> + NULL, OPEN_EXISTING, 0, 0);
> +
> if (hFile == INVALID_HANDLE_VALUE) return FALSE;
...
> + fullCmdLine = HeapAlloc(GetProcessHeap(), 0, fullCmdLength);
> + if(!fullCmdLine) return FALSE; /* return false on memory alloc failure */

You are still leaking a file handle here.

Why remove a CreateFileA call out of the reach of your new code since
you don't use hFile at all? 

-- 
Dmitry.






More information about the wine-devel mailing list