mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-02-14 15:40:17 +00:00
Don't try to delete [] things that weren't new'd.
This commit is contained in:
parent
bcf63a0fae
commit
763fb2719f
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user