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:
parent
91f1754ed9
commit
fd3cbd10da
1 changed files with 1 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue