[Scummvm-cvs-logs] CVS: scummvm/common gameDetector.cpp,1.139,1.140 gameDetector.h,1.54,1.55

Chris Apers chrilith at users.sourceforge.net
Fri Aug 29 01:05:10 CEST 2003


Update of /cvsroot/scummvm/scummvm/common
In directory sc8-pr-cvs1:/tmp/cvs-serv22289

Modified Files:
	gameDetector.cpp gameDetector.h 
Log Message:
Memory leak

Index: gameDetector.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/common/gameDetector.cpp,v
retrieving revision 1.139
retrieving revision 1.140
diff -u -d -r1.139 -r1.140
--- gameDetector.cpp	22 Aug 2003 01:18:49 -0000	1.139
+++ gameDetector.cpp	29 Aug 2003 08:04:54 -0000	1.140
@@ -267,6 +267,15 @@
 	}
 }
 
+#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;
 

Index: gameDetector.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/common/gameDetector.h,v
retrieving revision 1.54
retrieving revision 1.55
diff -u -d -r1.54 -r1.55
--- gameDetector.h	18 Aug 2003 23:19:53 -0000	1.54
+++ gameDetector.h	29 Aug 2003 08:04:54 -0000	1.55
@@ -108,6 +108,9 @@
 
 public:
 	GameDetector();
+#ifdef __PALM_OS__
+	~GameDetector();
+#endif
 
 	void parseCommandLine(int argc, char **argv);
 	int detectMain();





More information about the Scummvm-git-logs mailing list