[tracker] libtracker-data: Free memory when ending the function for handling errors
- From: Philip Van Hoof <pvanhoof src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker] libtracker-data: Free memory when ending the function for handling errors
- Date: Mon, 25 Oct 2010 12:55:19 +0000 (UTC)
commit 18afd6b45e6fb0698519bb7a76ec8ae446190a4e
Author: Philip Van Hoof <philip codeminded be>
Date: Tue Oct 19 15:03:17 2010 +0200
libtracker-data: Free memory when ending the function for handling errors
src/libtracker-data/tracker-data-manager.c | 45 ++++++++++++++++++++++++++++
1 files changed, 45 insertions(+), 0 deletions(-)
---
diff --git a/src/libtracker-data/tracker-data-manager.c b/src/libtracker-data/tracker-data-manager.c
index a2ab9a1..36916d6 100644
--- a/src/libtracker-data/tracker-data-manager.c
+++ b/src/libtracker-data/tracker-data-manager.c
@@ -3407,6 +3407,21 @@ tracker_data_manager_init (TrackerDBManagerFlags flags,
g_debug ("\nUnsupported ontology change, replaying journal\n");
g_error_free (ontology_error);
+ tracker_data_ontology_free_seen (seen_classes);
+ tracker_data_ontology_free_seen (seen_properties);
+ tracker_data_ontology_import_finished ();
+ tracker_data_commit_transaction (NULL);
+ if (ontos_table) {
+ g_hash_table_unref (ontos_table);
+ }
+ if (ontos) {
+ g_list_foreach (ontos, (GFunc) g_free, NULL);
+ g_list_free (ontos);
+ }
+ g_free (ontologies_dir);
+ if (uri_id_map) {
+ g_hash_table_unref (uri_id_map);
+ }
tracker_data_manager_shutdown ();
return tracker_data_manager_init (flags,
@@ -3445,6 +3460,21 @@ tracker_data_manager_init (TrackerDBManagerFlags flags,
g_debug ("\nUnsupported ontology change, replaying journal\n");
g_error_free (ontology_error);
+ tracker_data_ontology_free_seen (seen_classes);
+ tracker_data_ontology_free_seen (seen_properties);
+ tracker_data_ontology_import_finished ();
+ tracker_data_commit_transaction (NULL);
+ if (ontos_table) {
+ g_hash_table_unref (ontos_table);
+ }
+ if (ontos) {
+ g_list_foreach (ontos, (GFunc) g_free, NULL);
+ g_list_free (ontos);
+ }
+ g_free (ontologies_dir);
+ if (uri_id_map) {
+ g_hash_table_unref (uri_id_map);
+ }
tracker_data_manager_shutdown ();
return tracker_data_manager_init (flags,
@@ -3503,6 +3533,21 @@ tracker_data_manager_init (TrackerDBManagerFlags flags,
g_debug ("\nUnsupported ontology change, replaying journal\n");
g_error_free (ontology_error);
+ tracker_data_ontology_free_seen (seen_classes);
+ tracker_data_ontology_free_seen (seen_properties);
+ tracker_data_ontology_import_finished ();
+ tracker_data_commit_transaction (NULL);
+ if (ontos_table) {
+ g_hash_table_unref (ontos_table);
+ }
+ if (ontos) {
+ g_list_foreach (ontos, (GFunc) g_free, NULL);
+ g_list_free (ontos);
+ }
+ g_free (ontologies_dir);
+ if (uri_id_map) {
+ g_hash_table_unref (uri_id_map);
+ }
tracker_data_manager_shutdown ();
return tracker_data_manager_init (flags,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]