From 5f8630d41b069e6dbda0b6bc569d5c6c9044e3c4 Mon Sep 17 00:00:00 2001 From: Chris Apers Date: Fri, 29 Aug 2003 08:04:54 +0000 Subject: Memory leak svn-id: r9910 --- common/gameDetector.cpp | 9 +++++++++ common/gameDetector.h | 3 +++ 2 files changed, 12 insertions(+) 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(); -- cgit v1.2.3