1
0
Fork 0

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:
Peter Veenstra 2011-01-20 16:56:43 +00:00
parent 02b866dc4a
commit fceeb4756c
2 changed files with 4 additions and 3 deletions

View file

@ -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();

View file

@ -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] = "\\\\.\\";