aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Apers2003-08-29 08:04:54 +0000
committerChris Apers2003-08-29 08:04:54 +0000
commit5f8630d41b069e6dbda0b6bc569d5c6c9044e3c4 (patch)
treeb71dc9466c0f47e5f52aff56b9f3ccffd69e470a
parentea1cd18354faffe4f2454c2dceb2b015bcc75498 (diff)
downloadscummvm-rg350-5f8630d41b069e6dbda0b6bc569d5c6c9044e3c4.tar.gz
scummvm-rg350-5f8630d41b069e6dbda0b6bc569d5c6c9044e3c4.tar.bz2
scummvm-rg350-5f8630d41b069e6dbda0b6bc569d5c6c9044e3c4.zip
Memory leak
svn-id: r9910
-rw-r--r--common/gameDetector.cpp9
-rw-r--r--common/gameDetector.h3
2 files changed, 12 insertions, 0 deletions
diff --git a/common/gameDetector.cpp b/common/gameDetector.cpp
index 95786c4cc5..d4c52830c6 100644
--- a/common/gameDetector.cpp
+++ b/common/gameDetector.cpp
@@ -267,6 +267,15 @@ GameDetector::GameDetector() {
}
}
+#ifdef __PALM_OS__
+GameDetector::~GameDetector() {
+ // This is a previously allocated chunck (line 224)
+ // so we need to free it to prevent memory leak
+ VersionSettings *v = (VersionSettings *)version_settings;
+ free(v);
+}
+#endif
+
void GameDetector::updateconfig() {
const char *val;
diff --git a/common/gameDetector.h b/common/gameDetector.h
index 1f54990c3e..df43f68095 100644
--- a/common/gameDetector.h
+++ b/common/gameDetector.h
@@ -108,6 +108,9 @@ public:
public:
GameDetector();
+#ifdef __PALM_OS__
+ ~GameDetector();
+#endif
void parseCommandLine(int argc, char **argv);
int detectMain();