MZ_Exec() patch, try 3

Chris Morgan cmorgan at alum.wpi.edu
Mon Oct 21 21:28:27 CDT 2002


Damnit all.  One more time.  Thanks for the help Dimitry ;-)

Chris



On Monday 21 October 2002 07:52 pm, Dmitry Timoshkov wrote:
> "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?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: module.diff
Type: text/x-diff
Size: 3438 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-devel/attachments/20021021/d642f346/module.bin


More information about the wine-devel mailing list