1
0
Fork 0

Close filehandle in cas of not enough memory.

Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3540
This commit is contained in:
Peter Veenstra 2010-01-31 13:50:42 +00:00
parent 91f1754ed9
commit fd3cbd10da

View file

@ -331,6 +331,7 @@ bool DOS_Execute(char * name,PhysPt block_pt,Bit8u flags) {
if (dataread<0xf800) minsize=((dataread+0x10)>>4)+0x20;
}
if (maxfree<minsize) {
DOS_CloseFile(fhandle);
DOS_SetError(DOSERR_INSUFFICIENT_MEMORY);
DOS_FreeMemory(envseg);
return false;