Fix 2 leaks. (unlikely to occur though)
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3670
This commit is contained in:
parent
02b866dc4a
commit
fceeb4756c
2 changed files with 4 additions and 3 deletions
|
@ -2174,11 +2174,11 @@ CDebugVar* CDebugVar::FindVar(PhysPt pt)
|
|||
return 0;
|
||||
};
|
||||
|
||||
bool CDebugVar::SaveVars(char* name)
|
||||
{
|
||||
bool CDebugVar::SaveVars(char* name) {
|
||||
if (varList.size()>65535) return false;
|
||||
|
||||
FILE* f = fopen(name,"wb+");
|
||||
if (!f) return false;
|
||||
if (varList.size()>65535) return false;
|
||||
|
||||
// write number of vars
|
||||
Bit16u num = (Bit16u)varList.size();
|
||||
|
|
|
@ -45,6 +45,7 @@ bool SERIAL_open(const char* portname, COMPORT* port) {
|
|||
int len = strlen(portname);
|
||||
if(len > 240) {
|
||||
SetLastError(ERROR_BUFFER_OVERFLOW);
|
||||
free(cp);
|
||||
return false;
|
||||
}
|
||||
char extended_portname[256] = "\\\\.\\";
|
||||
|
|
Loading…
Add table
Reference in a new issue