summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlavioJS <FlavioJS@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-07-27 06:49:30 +0000
committerFlavioJS <FlavioJS@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-07-27 06:49:30 +0000
commit323d50335423b02c9bec0c60ed492c0a7e602a83 (patch)
tree74743e21f3bba30eabd509d38cd29ddc35e6e3c7
parent4d5304234f1e9b99fdb738e15f0d55fa53385e43 (diff)
downloadhercules-323d50335423b02c9bec0c60ed492c0a7e602a83.tar.gz
hercules-323d50335423b02c9bec0c60ed492c0a7e602a83.tar.bz2
hercules-323d50335423b02c9bec0c60ed492c0a7e602a83.tar.xz
hercules-323d50335423b02c9bec0c60ed492c0a7e602a83.zip
* Fixed a memory leak in mmo_auth_tosql (extra sql statement being allocated).
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13002 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r--Changelog-Trunk.txt1
-rw-r--r--src/login/account_sql.c1
2 files changed, 1 insertions, 1 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt
index cd6b940ac..f8679cabf 100644
--- a/Changelog-Trunk.txt
+++ b/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
diff --git a/src/login/account_sql.c b/src/login/account_sql.c
index 9bd5e292e..40b87829c 100644
--- a/src/login/account_sql.c
+++ b/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))