diff --git a/src/dos/dos_execute.cpp b/src/dos/dos_execute.cpp index bf180268..543ce108 100644 --- a/src/dos/dos_execute.cpp +++ b/src/dos/dos_execute.cpp @@ -315,6 +315,7 @@ bool DOS_Execute(char * name,PhysPt block_pt,Bit8u flags) { envseg=block.exec.envseg; if (!MakeEnv(name,&envseg)) { DOS_CloseFile(fhandle); + delete [] loadbuf; return false; } /* Get Memory */ diff --git a/src/hardware/ipx.cpp b/src/hardware/ipx.cpp index 8b410dae..9783df28 100644 --- a/src/hardware/ipx.cpp +++ b/src/hardware/ipx.cpp @@ -1072,7 +1072,7 @@ Bitu IPX_ESRHandler(void) { CALLBACK_RunRealFar(RealSeg(ESRList->getESRAddr()), RealOff(ESRList->getESRAddr())); } - delete ESRList; + delete ESRList; //Destructor updates this pointer to the next value or NULL } // while IO_WriteB(0xa0,0x63); //EOI11 diff --git a/src/shell/shell.cpp b/src/shell/shell.cpp index 88691abb..34610c3a 100644 --- a/src/shell/shell.cpp +++ b/src/shell/shell.cpp @@ -134,7 +134,10 @@ AutoexecObject::~AutoexecObject(){ if ((strncasecmp(buf2,"set ",4) == 0) && (strlen(buf2) > 4)){ char* after_set = buf2 + 4;//move to variable that is being set char* test = strpbrk(after_set,"="); - if (!test) continue; + if (!test) { + delete [] buf2; + continue; + } *test = 0; stringset = true; //If the shell is running/exists update the environment diff --git a/src/shell/shell_misc.cpp b/src/shell/shell_misc.cpp index 8723014e..e0282898 100644 --- a/src/shell/shell_misc.cpp +++ b/src/shell/shell_misc.cpp @@ -368,7 +368,7 @@ void DOS_Shell::InputCommand(char * line) { // remove current command from history if it's there if (current_hist) { - current_hist=false; + // current_hist=false; l_history.pop_front(); }