diff --git a/Source/Core/Core/Src/HW/WiimoteEmu/EmuSubroutines.cpp b/Source/Core/Core/Src/HW/WiimoteEmu/EmuSubroutines.cpp index 6b6519d7b2..7acf1a962d 100644 --- a/Source/Core/Core/Src/HW/WiimoteEmu/EmuSubroutines.cpp +++ b/Source/Core/Core/Src/HW/WiimoteEmu/EmuSubroutines.cpp @@ -427,6 +427,7 @@ void Wiimote::ReadData(const wm_read_data* const rd) if (address + size > WIIMOTE_EEPROM_SIZE) { PanicAlert("ReadData: address + size out of bounds"); + delete [] block; return; } // generate a read error diff --git a/Source/Core/Core/Src/Movie.cpp b/Source/Core/Core/Src/Movie.cpp index 9c2fb02d64..8777976776 100644 --- a/Source/Core/Core/Src/Movie.cpp +++ b/Source/Core/Core/Src/Movie.cpp @@ -304,7 +304,7 @@ bool BeginRecordingInput(int controllers) g_rerecords = 0; g_playMode = MODE_RECORDING; - delete tmpInput; + delete [] tmpInput; tmpInput = new u8[MAX_DTM_LENGTH]; g_currentByte = g_totalBytes = 0; @@ -653,7 +653,7 @@ void LoadInput(const char *filename) g_totalInputCount = tmpHeader.inputCount; g_totalBytes = totalSavedBytes; - delete tmpInput; + delete [] tmpInput; tmpInput = new u8[MAX_DTM_LENGTH]; t_record.ReadArray(tmpInput, (size_t)g_totalBytes); } @@ -707,7 +707,7 @@ void LoadInput(const char *filename) break; } } - delete movInput; + delete [] movInput; } } t_record.Close(); diff --git a/Source/Core/VideoCommon/Src/OpenCL/OCLTextureDecoder.cpp b/Source/Core/VideoCommon/Src/OpenCL/OCLTextureDecoder.cpp index 0f4809a6cc..8aabf2a066 100644 --- a/Source/Core/VideoCommon/Src/OpenCL/OCLTextureDecoder.cpp +++ b/Source/Core/VideoCommon/Src/OpenCL/OCLTextureDecoder.cpp @@ -143,8 +143,8 @@ void TexDecoder_OpenCL_Initialize() } } } - delete header; - delete binary; + delete [] header; + delete [] binary; } // If an error occurred using the kernel binary, recompile the kernels