[tracker/tracker-0.10] tracker-writeback: Do not unref the GFileInfo too early



commit f0c03d1d5463ace59f6dfe553c8fbb65ddb13ea9
Author: Carlos Garnacho <carlos lanedo com>
Date:   Thu Jul 28 17:33:31 2011 +0200

    tracker-writeback: Do not unref the GFileInfo too early
    
    it is used in the creation of the temporary file.

 src/tracker-writeback/tracker-writeback-file.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/src/tracker-writeback/tracker-writeback-file.c b/src/tracker-writeback/tracker-writeback-file.c
index 34e44f1..932253d 100644
--- a/src/tracker-writeback/tracker-writeback-file.c
+++ b/src/tracker-writeback/tracker-writeback-file.c
@@ -178,11 +178,11 @@ tracker_writeback_file_update_metadata (TrackerWriteback        *writeback,
 		}
 	}
 
-	g_object_unref (file_info);
-
 	if (!retval) {
 		/* module does not support writeback for this file */
 		g_object_unref (file);
+		g_object_unref (file_info);
+
 		return FALSE;
 	}
 
@@ -191,6 +191,8 @@ tracker_writeback_file_update_metadata (TrackerWriteback        *writeback,
 
 	if (!tmp_file) {
 		g_object_unref (file);
+		g_object_unref (file_info);
+
 		return FALSE;
 	}
 
@@ -211,6 +213,7 @@ tracker_writeback_file_update_metadata (TrackerWriteback        *writeback,
 	}
 
 	g_object_unref (tmp_file);
+	g_object_unref (file_info);
 	g_object_unref (file);
 
 	return retval;



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