[netfilter-cvslog] r7339 - branches/ulog/ulogd2/output/mysql

pablo at netfilter.org pablo at netfilter.org
Sun Feb 3 13:24:09 CET 2008


Author: pablo at netfilter.org
Date: 2008-02-03 13:24:08 +0100 (Sun, 03 Feb 2008)
New Revision: 7339

Modified:
   branches/ulog/ulogd2/output/mysql/ulogd_output_MYSQL.c
Log:
From: Pierre Chifflier <chifflier at inl.fr>

Change from procedure to function in mysql schema adds the need to free MySQL
result after request.


Modified: branches/ulog/ulogd2/output/mysql/ulogd_output_MYSQL.c
===================================================================
--- branches/ulog/ulogd2/output/mysql/ulogd_output_MYSQL.c	2008-02-03 12:23:10 UTC (rev 7338)
+++ branches/ulog/ulogd2/output/mysql/ulogd_output_MYSQL.c	2008-02-03 12:24:08 UTC (rev 7339)
@@ -231,6 +231,7 @@
 {
 	struct mysql_instance *mi = (struct mysql_instance *) upi->private;
 	int ret;
+	MYSQL_RES * result;
 
 	ret = mysql_real_query(mi->dbh, stmt, len);
 	if (ret) {
@@ -238,6 +239,10 @@
 			  mysql_error(mi->dbh));
 		return -1;
 	}
+	result = mysql_use_result(mi->dbh);
+	if (result) {
+		mysql_free_result(result);
+	}
 
 	return 0;
 }




More information about the netfilter-cvslog mailing list