* Fixed a memory leak when returning a string variable in the script engine. (since r9864/r9865, fixes bugreport:2488)

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13388 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
FlavioJS 2008-11-27 01:04:14 +00:00
parent af9aaee213
commit 0e6e32a833
2 changed files with 3 additions and 5 deletions

View File

@ -3,6 +3,9 @@ Date Added
AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO INTO TRUNK. 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. 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 2008/11/24
* Fixed a va_end using the wrong variable. (from r13383, fixes bugreport:2483) [FlavioJS] * Fixed a va_end using the wrong variable. (from r13383, fixes bugreport:2483) [FlavioJS]
2008/11/22 2008/11/22

View File

@ -3900,11 +3900,6 @@ BUILDIN_FUNC(return)
if( name[0] == '.' && name[1] == '@' ) if( name[0] == '.' && name[1] == '@' )
{// temporary script variable, convert to value {// temporary script variable, convert to value
get_val(st, data); 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 ) else if( name[0] == '.' && !data->ref )
{// script variable, link to current script {// script variable, link to current script