this causes another sigabrt for me, because the memory isn't being
cleared first and it's trying to free some random block of memory.
(btw, should i be attaching patches or putting them inline? thanks)

samuel

On 9/13/06, Jamie McCracken <[EMAIL PROTECTED]> wrote:
Samuel Cormier-Iijima wrote:
> found a problem when trying to get metadata for nonexistant metadata
> types, the problem was trying to free g_slice_new-allocated memory
> with g_free. patch attached :-)
>

Thanks

good spot but it would be better to call tracker_db_free_field_def
instead which calls g_slice_free as well as freeing the def->id field if
allocated

(no need to send updated patch)


--
Mr Jamie McCracken
http://jamiemcc.livejournal.com/

Index: tracker-db-mysql.c
===================================================================
RCS file: /cvs/gnome/tracker/src/trackerd/tracker-db-mysql.c,v
retrieving revision 1.9
diff -u -r1.9 tracker-db-mysql.c
--- tracker-db-mysql.c	13 Sep 2006 22:55:39 -0000	1.9
+++ tracker-db-mysql.c	13 Sep 2006 23:34:40 -0000
@@ -49,7 +49,7 @@
 	char	 ***res;
 	char	 **row;
 
-	def = g_slice_new (FieldDef);
+	def = g_slice_new0 (FieldDef);
 
 	res = tracker_exec_proc (db_con, "GetMetadataTypeInfo", 1, field_name);
 
_______________________________________________
tracker-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/tracker-list

Reply via email to