summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlavioJS <FlavioJS@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-11-27 01:04:14 +0000
committerFlavioJS <FlavioJS@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-11-27 01:04:14 +0000
commit5a68da99efb27a92e2dbd2b79c1db1410dd19704 (patch)
treec5485895b4f844c89fa0c236ebfe962a4ea208d6
parent1664e996a77c7d6cf090590c72d3af2e39f81a00 (diff)
downloadhercules-5a68da99efb27a92e2dbd2b79c1db1410dd19704.tar.gz
hercules-5a68da99efb27a92e2dbd2b79c1db1410dd19704.tar.bz2
hercules-5a68da99efb27a92e2dbd2b79c1db1410dd19704.tar.xz
hercules-5a68da99efb27a92e2dbd2b79c1db1410dd19704.zip
* Fixed a memory leak when returning a string variable in the script engine. (since r9864/r9865, fixes bugreport:2488)
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13388 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r--Changelog-Trunk.txt3
-rw-r--r--src/map/script.c5
2 files changed, 3 insertions, 5 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt
index 98de4f419..396817b86 100644
--- a/Changelog-Trunk.txt
+++ b/Changelog-Trunk.txt
@@ -3,6 +3,9 @@ Date Added
AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO INTO TRUNK.
IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
+2008/11/27
+ * Fixed a memory leak when returning a string variable in the script engine. [FlavioJS]
+ (since r9864/r9865, fixes bugreport:2488)
2008/11/24
* Fixed a va_end using the wrong variable. (from r13383, fixes bugreport:2483) [FlavioJS]
2008/11/22
diff --git a/src/map/script.c b/src/map/script.c
index 2786f082b..4cc7f36a2 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -3900,11 +3900,6 @@ BUILDIN_FUNC(return)
if( name[0] == '.' && name[1] == '@' )
{// temporary script variable, convert to value
get_val(st, data);
- if( data_isstring(data) )
- {// duplicate the string
- data->type = C_STR;
- data->u.str = aStrdup(data->u.str);
- }
}
else if( name[0] == '.' && !data->ref )
{// script variable, link to current script