tracker r1582 - branches/xesam-support/src/trackerd
- From: mottela svn gnome org
- To: svn-commits-list gnome org
- Subject: tracker r1582 - branches/xesam-support/src/trackerd
- Date: Wed, 4 Jun 2008 17:15:10 +0000 (UTC)
Author: mottela
Date: Wed Jun 4 17:15:10 2008
New Revision: 1582
URL: http://svn.gnome.org/viewvc/tracker?rev=1582&view=rev
Log:
Memory handling bug fixes to xesam get_hits
Modified:
branches/xesam-support/src/trackerd/tracker-db-sqlite.c
branches/xesam-support/src/trackerd/tracker-xesam-live-search.c
Modified: branches/xesam-support/src/trackerd/tracker-db-sqlite.c
==============================================================================
--- branches/xesam-support/src/trackerd/tracker-db-sqlite.c (original)
+++ branches/xesam-support/src/trackerd/tracker-db-sqlite.c Wed Jun 4 17:15:10 2008
@@ -3546,6 +3546,8 @@
if (!field_data_list) {
g_warning ("Asking for a non-mapped xesam field: %s", field_names[i]);
+ g_string_free (sql_select, TRUE);
+ g_string_free (sql_join, TRUE);
return NULL;
}
Modified: branches/xesam-support/src/trackerd/tracker-xesam-live-search.c
==============================================================================
--- branches/xesam-support/src/trackerd/tracker-xesam-live-search.c (original)
+++ branches/xesam-support/src/trackerd/tracker-xesam-live-search.c Wed Jun 4 17:15:10 2008
@@ -642,16 +642,20 @@
return;
}
- fields = g_value_get_boxed (value);
-
- result_set = tracker_db_get_live_search_get_hit_data (db_con,
- tracker_xesam_live_search_get_id (self), fields);
-
- g_debug ("Got something from get_hit_data");
-
- if (result_set) {
- get_hit_data (self, result_set, hits, g_strv_length(fields));
- g_object_unref (result_set);
+ if (value) {
+ fields = g_value_get_boxed (value);
+
+ result_set = tracker_db_get_live_search_get_hit_data (db_con,
+ tracker_xesam_live_search_get_id (self), fields);
+
+ g_debug ("Got something from get_hit_data");
+
+ if (result_set) {
+ get_hit_data (self, result_set, hits, g_strv_length(fields));
+ g_object_unref (result_set);
+ }
+
+ g_free (value);
}
}
}
@@ -697,14 +701,17 @@
return;
}
- fields = g_value_get_boxed (value);
-
- result_set = tracker_db_get_live_search_get_hit_data (db_con,
- tracker_xesam_live_search_get_id (self), fields);
-
- if (result_set) {
- get_hit_data (self, result_set, hits, g_strv_length(fields));
- g_object_unref (result_set);
+ if (value) {
+ fields = g_value_get_boxed (value);
+
+ result_set = tracker_db_get_live_search_get_hit_data (db_con,
+ tracker_xesam_live_search_get_id (self), fields);
+
+ if (result_set) {
+ get_hit_data (self, result_set, hits, g_strv_length(fields));
+ g_object_unref (result_set);
+ }
+ g_free (value);
}
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]