tracker r2598 - branches/turtle/src/libtracker-data
- From: pvanhoof svn gnome org
- To: svn-commits-list gnome org
- Subject: tracker r2598 - branches/turtle/src/libtracker-data
- Date: Thu, 27 Nov 2008 14:44:33 +0000 (UTC)
Author: pvanhoof
Date: Thu Nov 27 14:44:33 2008
New Revision: 2598
URL: http://svn.gnome.org/viewvc/tracker?rev=2598&view=rev
Log:
One more memory leak in case field doesn't exist in the ontology
Modified:
branches/turtle/src/libtracker-data/tracker-data-metadata.c
Modified: branches/turtle/src/libtracker-data/tracker-data-metadata.c
==============================================================================
--- branches/turtle/src/libtracker-data/tracker-data-metadata.c (original)
+++ branches/turtle/src/libtracker-data/tracker-data-metadata.c Thu Nov 27 14:44:33 2008
@@ -175,7 +175,13 @@
field = tracker_ontology_get_field_by_name (field_name);
- g_return_if_fail (TRACKER_IS_FIELD (field));
+ if (!field) {
+ g_warning ("Field name '%s' has isn't described in the ontology", field_name);
+ g_list_foreach (list, (GFunc) g_free, NULL);
+ g_list_free (list);
+ return;
+ }
+
g_return_if_fail (tracker_field_get_multiple_values (field) == TRUE);
old_values = g_hash_table_lookup (metadata->table, field);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]