From 0ee75674fcfc545d2f0fb55cebe909cee506ea8e Mon Sep 17 00:00:00 2001 From: Strangerke Date: Tue, 20 Sep 2016 23:26:23 +0200 Subject: DM: Fix two memory leaks --- engines/dm/loadsave.cpp | 1 + engines/dm/menus.cpp | 1 + 2 files changed, 2 insertions(+) (limited to 'engines/dm') 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() { -- cgit v1.2.3