Don't try to delete [] things that weren't new'd.

This commit is contained in:
Unknown W. Brackets 2014-04-27 20:48:59 -07:00
parent bcf63a0fae
commit 763fb2719f
1 changed files with 0 additions and 24 deletions

View File

@ -366,12 +366,6 @@ int cellSaveDataListSave2(u32 version, mem_ptr_t<CellSaveDataSetList> setList, m
// Enter the loop where the save files are read/created/deleted.
s32 ret = modifySaveDataFiles(funcFile, result.GetAddr(), saveBaseDir + (char*)statGet->dir.dirName);
// TODO: There are other returns in this function that doesn't free the memory. Fix it (without using goto's, please).
for (auto& entry : saveEntries) {
delete[] entry.iconBuf;
entry.iconBuf = nullptr;
}
return ret;
}
@ -457,12 +451,6 @@ int cellSaveDataListLoad2(u32 version, mem_ptr_t<CellSaveDataSetList> setList, m
// Enter the loop where the save files are read/created/deleted.
s32 ret = modifySaveDataFiles(funcFile, result.GetAddr(), saveBaseDir + (char*)statGet->dir.dirName);
// TODO: There are other returns in this function that doesn't free the memory. Fix it (without using goto's, please).
for (auto& entry : saveEntries) {
delete[] entry.iconBuf;
entry.iconBuf = nullptr;
}
return ret;
}
@ -535,12 +523,6 @@ int cellSaveDataFixedSave2(u32 version, mem_ptr_t<CellSaveDataSetList> setList,
// Enter the loop where the save files are read/created/deleted.
s32 ret = modifySaveDataFiles(funcFile, result.GetAddr(), saveBaseDir + (char*)statGet->dir.dirName);
// TODO: There are other returns in this function that doesn't free the memory. Fix it (without using goto's, please).
for (auto& entry : saveEntries) {
delete[] entry.iconBuf;
entry.iconBuf = nullptr;
}
return ret;
}
@ -613,12 +595,6 @@ int cellSaveDataFixedLoad2(u32 version, mem_ptr_t<CellSaveDataSetList> setList,
// Enter the loop where the save files are read/created/deleted.
s32 ret = modifySaveDataFiles(funcFile, result.GetAddr(), saveBaseDir + (char*)statGet->dir.dirName);
// TODO: There are other returns in this function that doesn't free the memory. Fix it (without using goto's, please).
for (auto& entry : saveEntries) {
delete[] entry.iconBuf;
entry.iconBuf = nullptr;
}
return ret;
}