mirror of
https://github.com/anope/anope.git
synced 2026-06-28 13:56:39 +02:00
Memory leak when using mysql to save data.
git-svn-id: svn://svn.anope.org/anope/trunk@860 31f1291d-b8d6-0310-a050-a5561fc1590b git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@612 5417fbe8-f217-4b02-8779-1006273d7864
This commit is contained in:
parent
0d8069941a
commit
01bfee779b
@@ -7,6 +7,7 @@ Provided by Anope Dev. <dev@anope.org> - 2005
|
||||
07/01 A Events for channel access/xop updates. [ #00]
|
||||
06/26 A New module pack module: hs_request. [ #00]
|
||||
06/03 A Protocol files can now fill mod_current_buffer with custom code. [#389]
|
||||
08/29 F Memory leak when using mysql to save data. [ #00]
|
||||
08/29 F Organised docs/FAQ a bit more and slightly restyled it. [ #00]
|
||||
08/25 F Compiler warnings in tools with gcc4. [ #00]
|
||||
08/21 F Default config location in example.conf was wrong. [ #00]
|
||||
@@ -426,7 +427,7 @@ Provided by Trystan <trystan@nomadirc.net> - 2004
|
||||
10/14 F Fixed NickServ Logout. [#180]
|
||||
10/14 F Fixed HelpChannel with Unreal. [#180]
|
||||
10/09 F Bug in MySQL debug, possibly causing segfaults. [#149]
|
||||
10/09 F Lots of code clean up to prevent segfaults. [ #00]
|
||||
10/09 F Lots of code clean up to prevent segfaults. [ #00]
|
||||
10/07 F Fixed TSMODE ircds that don't stay this in their CAPAB. [ #00]
|
||||
10/05 F Cleaned up how OS/CS CLEAR MODES works. [ #00]
|
||||
09/27 F Verbose message for vident. [#173]
|
||||
|
||||
+30
-25
@@ -413,10 +413,16 @@ void db_mysql_save_cs_info(ChannelInfo * ci)
|
||||
*cbadwords, *efounderpass;
|
||||
|
||||
ciname = db_mysql_quote(ci->name);
|
||||
cifoundernick =
|
||||
ci->founder ? db_mysql_quote(ci->founder->display) : "";
|
||||
cisuccessornick =
|
||||
ci->successor ? db_mysql_quote(ci->successor->display) : "";
|
||||
if(ci->founder) {
|
||||
cifoundernick = db_mysql_quote(ci->founder->display);
|
||||
} else {
|
||||
cifoundernick = db_mysql_quote("");
|
||||
}
|
||||
if(ci->successor) {
|
||||
cisuccessornick = db_mysql_quote(ci->successor->display);
|
||||
} else {
|
||||
cisuccessornick = db_mysql_quote("");
|
||||
}
|
||||
cifounderpass = db_mysql_quote(ci->founderpass);
|
||||
cidesc = db_mysql_quote(ci->desc);
|
||||
ciurl = db_mysql_quote(ci->url);
|
||||
@@ -429,7 +435,11 @@ void db_mysql_save_cs_info(ChannelInfo * ci)
|
||||
cimlock_flood = db_mysql_quote(ci->mlock_flood);
|
||||
cimlock_redirect = db_mysql_quote(ci->mlock_redirect);
|
||||
cientrymsg = db_mysql_quote(ci->entry_message);
|
||||
cibotnick = ci->bi ? db_mysql_quote(ci->bi->nick) : "";
|
||||
if(ci->bi) {
|
||||
cibotnick = db_mysql_quote(ci->bi->nick);
|
||||
} else {
|
||||
cibotnick = db_mysql_quote("");
|
||||
}
|
||||
|
||||
efounderpass = db_mysql_secure(cifounderpass);
|
||||
free(cifounderpass);
|
||||
@@ -605,26 +615,21 @@ void db_mysql_save_cs_info(ChannelInfo * ci)
|
||||
}
|
||||
|
||||
free(ciname);
|
||||
if (!(ci->flags & CI_VERBOTEN)) {
|
||||
free(cifoundernick);
|
||||
if (strlen(cisuccessornick) > 0)
|
||||
free(cisuccessornick);
|
||||
free(efounderpass);
|
||||
free(cidesc);
|
||||
free(ciurl);
|
||||
free(ciemail);
|
||||
free(cilasttopic);
|
||||
free(cilasttopicsetter);
|
||||
free(cimlock_key);
|
||||
free(cimlock_flood);
|
||||
free(cimlock_redirect);
|
||||
free(cientrymsg);
|
||||
if (ci->bi)
|
||||
free(cibotnick);
|
||||
} else {
|
||||
free(ciforbidby);
|
||||
free(ciforbidreason);
|
||||
}
|
||||
free(cifoundernick); /* mark */
|
||||
free(cisuccessornick); /* mark */
|
||||
free(efounderpass);
|
||||
free(cidesc);
|
||||
free(ciurl);
|
||||
free(ciemail);
|
||||
free(cilasttopic);
|
||||
free(cilasttopicsetter);
|
||||
free(cimlock_key);
|
||||
free(cimlock_flood);
|
||||
free(cimlock_redirect);
|
||||
free(cientrymsg);
|
||||
free(cibotnick); /* mark */
|
||||
free(ciforbidby);
|
||||
free(ciforbidreason);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user