summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlfredo Tupone <tupone@gentoo.org>2006-09-01 23:45:28 +0000
committerAlfredo Tupone <tupone@gentoo.org>2006-09-01 23:45:28 +0000
commit83d224b91c66c761b990bcff6ff704dfffc5f45a (patch)
tree868f7778dba6bd1952e6e9f2adc5802c6ab7ea1e /games-arcade/tomatoes/files
parentAdded ebuilds for the 2006.0 and 2006.1 releases. (diff)
downloadgentoo-2-83d224b91c66c761b990bcff6ff704dfffc5f45a.tar.gz
gentoo-2-83d224b91c66c761b990bcff6ff704dfffc5f45a.tar.bz2
gentoo-2-83d224b91c66c761b990bcff6ff704dfffc5f45a.zip
Fixing memory leak, Bug #129778
(Portage version: 2.1-r2)
Diffstat (limited to 'games-arcade/tomatoes/files')
-rw-r--r--games-arcade/tomatoes/files/digest-tomatoes-1.55-r26
-rw-r--r--games-arcade/tomatoes/files/tomatoes-1.55-c_str.patch10
2 files changed, 12 insertions, 4 deletions
diff --git a/games-arcade/tomatoes/files/digest-tomatoes-1.55-r2 b/games-arcade/tomatoes/files/digest-tomatoes-1.55-r2
new file mode 100644
index 000000000000..f457e71c188b
--- /dev/null
+++ b/games-arcade/tomatoes/files/digest-tomatoes-1.55-r2
@@ -0,0 +1,6 @@
+MD5 a6a7ff71bb1098fd0a4098fd3d846339 tomatoes-linux-1.5.tar.bz2 8807421
+RMD160 454591162df5266a6ecb88b0b67914a5c0348a04 tomatoes-linux-1.5.tar.bz2 8807421
+SHA256 69a3af1994cb58409be9b469e1aa4bdb91c405d99071c7431526640ec53d1300 tomatoes-linux-1.5.tar.bz2 8807421
+MD5 b0fa201bfb55d1cb402c52ab7e743086 tomatoes-linux-src-1.55.tar.bz2 62947
+RMD160 a57881902e3c917733058e3b9c936d2db5ca0e3a tomatoes-linux-src-1.55.tar.bz2 62947
+SHA256 126d001532ee5b81cc95e1a86a274d11669b8c8f65c8235ae2e9b8fbdfab4a60 tomatoes-linux-src-1.55.tar.bz2 62947
diff --git a/games-arcade/tomatoes/files/tomatoes-1.55-c_str.patch b/games-arcade/tomatoes/files/tomatoes-1.55-c_str.patch
index 47f5e68dec80..dd6927e54153 100644
--- a/games-arcade/tomatoes/files/tomatoes-1.55-c_str.patch
+++ b/games-arcade/tomatoes/files/tomatoes-1.55-c_str.patch
@@ -4,18 +4,20 @@
// makefile.
char *get_config_location(bool write) {
#ifdef LINUX
-+ char *config_path;
++ static char *config_path = NULL;
// Get the path to the config file
string tmp = get_tomatoes_dir() + "config.cfg";
-@@ -90,8 +91,9 @@
+@@ -90,8 +91,11 @@
}
fclose(ftest);
}
-
- return (char*)tmp.c_str();
-+ config_path = new char[tmp.length()+1];
-+ strcpy(config_path,tmp.c_str());
++ if (!config_path) {
++ config_path = new char[tmp.length()+1];
++ strcpy(config_path,tmp.c_str());
++ }
+ return config_path;
#endif