summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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