[tracker/rss-enclosures] libtracker-common: If error splicing, let user callback free it



commit 58f61e1947bf111c613904a5e61382c9384312dd
Author: Aleksander Morgado <aleksander lanedo com>
Date:   Tue Jul 20 10:18:38 2010 +0200

    libtracker-common: If error splicing, let user callback free it

 src/libtracker-common/tracker-dbus.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/src/libtracker-common/tracker-dbus.c b/src/libtracker-common/tracker-dbus.c
index ce2c3dd..c670539 100644
--- a/src/libtracker-common/tracker-dbus.c
+++ b/src/libtracker-common/tracker-dbus.c
@@ -890,7 +890,10 @@ send_and_splice_async_callback (GObject      *source,
 
 		(* data->callback) (NULL, -1, error, data->user_data);
 
-		g_error_free (error);
+		/* Note: GError should be freed by callback. We do this to be aligned
+		 * with the behavior of dbus-glib, where if an error happens, the
+		 * GError passed to the callback is supposed to be disposed by the
+		 * callback itself. */
 	}
 
 	if (reply) {



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