"Chris Morgan" <[EMAIL PROTECTED]> 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.




Reply via email to