diff options
author | Chris Apers | 2003-08-19 15:03:27 +0000 |
---|---|---|
committer | Chris Apers | 2003-08-19 15:03:27 +0000 |
commit | a6d7d1521e8135d1e8ef45b4a630ee9219b4ad74 (patch) | |
tree | 8e37c3754596868a9ee97697ef4e51464087743b /common | |
parent | ec447fdfbbd55bf7e9d5c623f4262e59443f6d7a (diff) | |
download | scummvm-rg350-a6d7d1521e8135d1e8ef45b4a630ee9219b4ad74.tar.gz scummvm-rg350-a6d7d1521e8135d1e8ef45b4a630ee9219b4ad74.tar.bz2 scummvm-rg350-a6d7d1521e8135d1e8ef45b4a630ee9219b4ad74.zip |
Fix 1 memory leak + 102 memory leaks using launcher
svn-id: r9783
Diffstat (limited to 'common')
-rw-r--r-- | common/main.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/common/main.cpp b/common/main.cpp index eab5f60f2a..725c544e60 100644 --- a/common/main.cpp +++ b/common/main.cpp @@ -200,10 +200,8 @@ int main(int argc, char *argv[]) { launcherDialog(detector, system); // Verify the given game name - if (detector.detectMain()) { - system->quit(); - return -1; - } + if (detector.detectMain()) + goto exitNow; // Set the window caption to the game name prop.caption = g_config->get("description", detector._gameFileName); @@ -217,7 +215,7 @@ int main(int argc, char *argv[]) { prop.gfx_mode = GFX_NORMAL; system->property(OSystem::PROP_SET_GFX_MODE, &prop); } - + // Create the game engine Engine *engine = Engine::createFromDetector(&detector, system); @@ -234,12 +232,14 @@ int main(int argc, char *argv[]) { // Free up memory delete engine; +exitNow: delete g_gui; delete g_config; // ...and quit (the return 0 should never be reached) system->quit(); - delete system; // palmos leaks + delete system; + free((void *)version_settings); // allocated in GameDetector return 0; } |