diff options
author | Willem Jan Palenstijn | 2009-10-01 11:02:23 +0000 |
---|---|---|
committer | Willem Jan Palenstijn | 2009-10-01 11:02:23 +0000 |
commit | 5a8b81119b5292036a6d63c94a37ced70ff9c083 (patch) | |
tree | 358694717d500233fb588c26b9854b12425e360c | |
parent | 7d40dde96f09e7f3f1722b184bfbef30adc5ad4d (diff) | |
download | scummvm-rg350-5a8b81119b5292036a6d63c94a37ced70ff9c083.tar.gz scummvm-rg350-5a8b81119b5292036a6d63c94a37ced70ff9c083.tar.bz2 scummvm-rg350-5a8b81119b5292036a6d63c94a37ced70ff9c083.zip |
Fix free/delete/delete[] mismatches. Patch by salty-horse
svn-id: r44512
-rw-r--r-- | engines/sword1/control.cpp | 4 | ||||
-rw-r--r-- | engines/sword2/resman.cpp | 2 |
2 files changed, 3 insertions, 3 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; } diff --git a/engines/sword2/resman.cpp b/engines/sword2/resman.cpp index c49fb8e786..330abf4adf 100644 --- a/engines/sword2/resman.cpp +++ b/engines/sword2/resman.cpp @@ -179,7 +179,7 @@ bool ResourceManager::init() { cdInf[i].cd = file.readByte(); if (file.eos() || file.err()) { - delete cdInf; + delete[] cdInf; file.close(); GUIErrorMessage("Broken Sword 2: Cannot read cd.inf"); return false; |