aboutsummaryrefslogtreecommitdiff
path: root/engines/dm
diff options
context:
space:
mode:
authorStrangerke2016-09-20 23:26:23 +0200
committerStrangerke2016-09-20 23:26:23 +0200
commit0ee75674fcfc545d2f0fb55cebe909cee506ea8e (patch)
tree9d261e4c92ef3b76a03815294f600cb473241e00 /engines/dm
parent2458fd090cd9d937e0d3bc8c042b6ebad1dab6c0 (diff)
downloadscummvm-rg350-0ee75674fcfc545d2f0fb55cebe909cee506ea8e.tar.gz
scummvm-rg350-0ee75674fcfc545d2f0fb55cebe909cee506ea8e.tar.bz2
scummvm-rg350-0ee75674fcfc545d2f0fb55cebe909cee506ea8e.zip
DM: Fix two memory leaks
Diffstat (limited to 'engines/dm')
-rw-r--r--engines/dm/loadsave.cpp1
-rw-r--r--engines/dm/menus.cpp1
2 files changed, 2 insertions, 0 deletions
diff --git a/engines/dm/loadsave.cpp b/engines/dm/loadsave.cpp
index 9f19b92bf2..111280c958 100644
--- a/engines/dm/loadsave.cpp
+++ b/engines/dm/loadsave.cpp
@@ -183,6 +183,7 @@ void DMEngine::saveGame() {
if (saveAndPlayChoice == kLoad) {
GUI::SaveLoadChooser *dialog = new GUI::SaveLoadChooser(_("Restore game:"), _("Restore"), false);
int loadSlot = dialog->runModalWithCurrentTarget();
+ delete dialog;
if (loadSlot >= 0) {
_loadSaveSlotAtRuntime = loadSlot;
return;
diff --git a/engines/dm/menus.cpp b/engines/dm/menus.cpp
index 7ced12e5a0..5cbb4697d4 100644
--- a/engines/dm/menus.cpp
+++ b/engines/dm/menus.cpp
@@ -163,6 +163,7 @@ MenuMan::MenuMan(DMEngine *vm) : _vm(vm) {
MenuMan::~MenuMan() {
delete[] _bitmapSpellAreaLine;
+ delete[] _bitmapSpellAreaLines;
}
void MenuMan::drawMovementArrows() {