summaryrefslogtreecommitdiff
path: root/mysql.c
diff options
context:
space:
mode:
authorkeeper keeper@31f1291d-b8d6-0310-a050-a5561fc1590b <keeper keeper@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>2004-05-08 10:54:55 +0000
committerkeeper keeper@31f1291d-b8d6-0310-a050-a5561fc1590b <keeper keeper@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>2004-05-08 10:54:55 +0000
commit7ce3bb99f8b2f821181c2e64c632058fe02a8a21 (patch)
treefe456fb2e6d76717a97e62ef9827bcc1b0496047 /mysql.c
parent79a10a459ddd25c9a00e8d1bfc80b5fdf13b2ee5 (diff)
BUILD : 1.7.2 (91) BUGS : NOTES : db_mysql_query memory usage tweaked.
git-svn-id: svn://svn.anope.org/anope/trunk@91 31f1291d-b8d6-0310-a050-a5561fc1590b git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@67 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'mysql.c')
-rw-r--r--mysql.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/mysql.c b/mysql.c
index 442af9843..c72ea5aa1 100644
--- a/mysql.c
+++ b/mysql.c
@@ -105,16 +105,18 @@ int db_mysql_open()
int db_mysql_query(char *sql)
{
int result, lcv;
- char *s = db_mysql_quote(sql);
+ char *s;
if (!do_mysql) {
- free(s);
return -1;
}
- if (debug)
+ if (debug) {
+ s = db_mysql_quote(sql);
alog(s);
- free(s);
+ free(s);
+
+ }
result = mysql_query(mysql, sql);