Free memory if there is an error in the relocation table.

git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@695 6ac86273-5f31-0410-b378-82cca8765d1b
This commit is contained in:
Bart Oldeman 2003-09-18 20:54:21 +00:00
parent 2f4e2d3a69
commit c20f68e73d
1 changed files with 5 additions and 0 deletions

View File

@ -693,6 +693,11 @@ COUNT DosExeLoader(BYTE FAR * namep, exec_blk * exp, COUNT mode, COUNT fd)
if (DosRWSft
(fd, sizeof(reloc), (VOID FAR *) & reloc[0], XFR_READ) != sizeof(reloc))
{
if (mode != OVERLAY)
{
DosMemFree(--mem);
DosMemFree(env);
}
return DE_INVLDDATA;
}
if (mode == OVERLAY)