aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2006-10-11 21:36:31 +0000
committerSergey Poznyakoff <gray@gnu.org.ua>2006-10-11 21:36:31 +0000
commitff966786d7193027f687c192b81c7bf87407dd46 (patch)
tree3cddb5c9f17f8771d60b7a4dde4b61ce8ce3106a
parent8ff3b2a72bfedfe2c032d3e4903f48ac3d1adfdb (diff)
downloadgamma-ff966786d7193027f687c192b81c7bf87407dd46.tar.gz
gamma-ff966786d7193027f687c192b81c7bf87407dd46.tar.bz2
(s_mysql_free): Bugfix: mysql was freed twice
(s_mysql_query): Fix the first argument to scm_list_2
-rw-r--r--src/mysql.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/mysql.c b/src/mysql.c
index 7abbf2e..d788a92 100644
--- a/src/mysql.c
+++ b/src/mysql.c
@@ -35,7 +35,6 @@ s_mysql_free(struct sql_connect *conn)
35 if (!mysql) 35 if (!mysql)
36 return 0; 36 return 0;
37 mysql_close(mysql); 37 mysql_close(mysql);
38 free(mysql);
39 return sizeof(MYSQL); 38 return sizeof(MYSQL);
40} 39}
41 40
@@ -131,7 +130,7 @@ s_mysql_query(struct sql_connect *conn, char *query)
131 cell = scm_makenum(mysql_affected_rows(mysql)); 130 cell = scm_makenum(mysql_affected_rows(mysql));
132 } else { /* mysql_store_result() should have returned data */ 131 } else { /* mysql_store_result() should have returned data */
133 scm_throw(gsql_error, 132 scm_throw(gsql_error,
134 scm_list_2("Query should have returned data", 133 scm_list_2(scm_makfrom0str("Query should have returned data"),
135 scm_makfrom0str(mysql_error(mysql)))); 134 scm_makfrom0str(mysql_error(mysql))));
136 } 135 }
137 } 136 }

Return to:

Send suggestions and report system problems to the System administrator.