22 Oct
2002
22 Oct
'02
12:52 a.m.
"Chris Morgan" <cmorgan(a)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.