Re: [gnome-db] A few bug fix in mysql provider



The previous patch has been committed to HEAD.  Below is a patch to
1.0 branch that fixes only the leak.

:-),



Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/libgda/ChangeLog,v
retrieving revision 1.560.2.15
diff -u -r1.560.2.15 ChangeLog
--- ChangeLog	12 Oct 2003 16:10:45 -0000	1.560.2.15
+++ ChangeLog	16 Oct 2003 23:10:31 -0000
@@ -1,3 +1,8 @@
+2003-10-16  Paisa Seeluagnsawat <paisa users sf net>
+
+	* provider/mysql/gda-mysql-recordset.c: fixed possible memory
+	leak in fetch_row() by moving gda_row_new() a few lines down.
+
 2003-10-12  Rodrigo Moya <rodrigo gnome-db org>
 
 	Released 1.0.1
Index: providers/mysql/gda-mysql-recordset.c
===================================================================
RCS file: /cvs/gnome/libgda/providers/mysql/gda-mysql-recordset.c,v
retrieving revision 1.26
diff -u -r1.26 gda-mysql-recordset.c
--- providers/mysql/gda-mysql-recordset.c	24 Aug 2003 12:07:16 -0000	1.26
+++ providers/mysql/gda-mysql-recordset.c	16 Oct 2003 23:10:31 -0000
@@ -71,14 +71,14 @@
 	}
 
 	mysql_data_seek (recset->mysql_res, rownum);
-	row = gda_row_new (GDA_DATA_MODEL (recset), field_count);
-
 	lengths = recset->mysql_res->lengths;
 	mysql_fields = mysql_fetch_fields (recset->mysql_res);
 
 	mysql_row = mysql_fetch_row (recset->mysql_res);
 	if (!mysql_row)
 		return NULL;
+
+	row = gda_row_new (GDA_DATA_MODEL (recset), field_count);
 
 	for (i = 0; i < field_count; i++) {
 		GdaValue *field;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]