aboutsummaryrefslogtreecommitdiff
path: root/engines/sword1/control.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/sword1/control.cpp')
-rw-r--r--engines/sword1/control.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/engines/sword1/control.cpp b/engines/sword1/control.cpp
index 2134e7dc2d..5a3c614df4 100644
--- a/engines/sword1/control.cpp
+++ b/engines/sword1/control.cpp
@@ -1268,7 +1268,7 @@ bool Control::convertSaveGame(uint8 slot, char* desc) {
if (!newSave) {
// Display a warning message and do nothing
warning("Unable to create file '%s'. (%s)", newFileName, _saveFileMan->popErrorDesc().c_str());
- free(saveData);
+ delete[] saveData;
saveData = NULL;
return false;
}
@@ -1299,7 +1299,7 @@ bool Control::convertSaveGame(uint8 slot, char* desc) {
_saveFileMan->removeSavefile(oldFileName);
// Cleanup
- free(saveData);
+ delete[] saveData;
saveData = NULL;
return true;
}