Pick some lowhanging fruit. (some memory leaks and unused variables)
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@4264
This commit is contained in:
parent
ca20ca3a3e
commit
a919e33aec
4 changed files with 7 additions and 3 deletions
|
@ -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 */
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue