Merge remote-tracking branch 'timowiren/master'

This commit is contained in:
Shawn Hoffman 2012-03-25 13:21:25 -07:00
commit 48eb791a4e
3 changed files with 7 additions and 6 deletions

View File

@ -427,6 +427,7 @@ void Wiimote::ReadData(const wm_read_data* const rd)
if (address + size > WIIMOTE_EEPROM_SIZE) if (address + size > WIIMOTE_EEPROM_SIZE)
{ {
PanicAlert("ReadData: address + size out of bounds"); PanicAlert("ReadData: address + size out of bounds");
delete [] block;
return; return;
} }
// generate a read error // generate a read error

View File

@ -304,7 +304,7 @@ bool BeginRecordingInput(int controllers)
g_rerecords = 0; g_rerecords = 0;
g_playMode = MODE_RECORDING; g_playMode = MODE_RECORDING;
delete tmpInput; delete [] tmpInput;
tmpInput = new u8[MAX_DTM_LENGTH]; tmpInput = new u8[MAX_DTM_LENGTH];
g_currentByte = g_totalBytes = 0; g_currentByte = g_totalBytes = 0;
@ -653,7 +653,7 @@ void LoadInput(const char *filename)
g_totalInputCount = tmpHeader.inputCount; g_totalInputCount = tmpHeader.inputCount;
g_totalBytes = totalSavedBytes; g_totalBytes = totalSavedBytes;
delete tmpInput; delete [] tmpInput;
tmpInput = new u8[MAX_DTM_LENGTH]; tmpInput = new u8[MAX_DTM_LENGTH];
t_record.ReadArray(tmpInput, (size_t)g_totalBytes); t_record.ReadArray(tmpInput, (size_t)g_totalBytes);
} }
@ -707,7 +707,7 @@ void LoadInput(const char *filename)
break; break;
} }
} }
delete movInput; delete [] movInput;
} }
} }
t_record.Close(); t_record.Close();

View File

@ -114,7 +114,7 @@ void TexDecoder_OpenCL_Initialize()
else else
{ {
binary_size = input.GetSize(); binary_size = input.GetSize();
header = new char[HEADER_SIZE]; // TODO: memleak possible header = new char[HEADER_SIZE];
binary = new char[binary_size]; binary = new char[binary_size];
input.ReadBytes(header, HEADER_SIZE); input.ReadBytes(header, HEADER_SIZE);
input.ReadBytes(binary, binary_size); input.ReadBytes(binary, binary_size);
@ -143,8 +143,8 @@ void TexDecoder_OpenCL_Initialize()
} }
} }
} }
delete header; delete [] header;
delete binary; delete [] binary;
} }
// If an error occurred using the kernel binary, recompile the kernels // If an error occurred using the kernel binary, recompile the kernels