Browse Source

* Fixed a memory leak in mmo_auth_tosql (extra sql statement being allocated).

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13002 54d463be-8e91-2dee-dedb-b68131a5f0ec
FlavioJS 17 years ago
parent
commit
a389d52d34
2 changed files with 1 additions and 1 deletions
  1. 1 0
      Changelog-Trunk.txt
  2. 0 1
      src/login/account_sql.c

+ 1 - 0
Changelog-Trunk.txt

@@ -4,6 +4,7 @@ AS OF SVN REV. 5091, WE ARE NOW USING TRUNK.  ALL UNTESTED BUGFIXES/FEATURES GO
 IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
 
 2008/07/27
+	* Fixed a memory leak in mmo_auth_tosql (extra sql statement being allocated).
 	* Added missing option 'log_db_db' to loginlog_config_read(loginlog_sql.c).
 	* Fixed a memory leak in account_db_sql_destroy. [FlavioJS]
 	* Changed the way GM levels are handled

+ 0 - 1
src/login/account_sql.c

@@ -518,7 +518,6 @@ static bool mmo_auth_tosql(AccountDB_SQL* db, const struct mmo_account* acc, boo
 	}
 	else
 	{// update account table
-		stmt = SqlStmt_Malloc(sql_handle);
 		if( SQL_SUCCESS != SqlStmt_Prepare(stmt, "UPDATE `%s` SET `userid`=?,`user_pass`=?,`sex`=?,`email`=?,`level`=?,`state`=?,`unban_time`=?,`expiration_time`=?,`logincount`=?,`lastlogin`=?,`last_ip`=? WHERE `account_id` = '%d'", db->account_db, acc->account_id)
 		||  SQL_SUCCESS != SqlStmt_BindParam(stmt,  0, SQLDT_STRING, (void*)acc->userid,           strlen(acc->userid))
 		||  SQL_SUCCESS != SqlStmt_BindParam(stmt,  1, SQLDT_STRING, (void*)acc->pass,             strlen(acc->pass))