[tracker/miner-stdgio] libtracker-miner: Fix a leak with g_error_copy



commit e2d0f53daa755844b25c0f921afdfb5ca1145891
Author: Adrien Bustany <madcat mymadcat com>
Date:   Tue Nov 24 06:49:23 2009 -0300

    libtracker-miner: Fix a leak with g_error_copy

 src/libtracker-miner/tracker-miner.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)
---
diff --git a/src/libtracker-miner/tracker-miner.c b/src/libtracker-miner/tracker-miner.c
index f3bf511..a491cc8 100644
--- a/src/libtracker-miner/tracker-miner.c
+++ b/src/libtracker-miner/tracker-miner.c
@@ -761,11 +761,10 @@ run_update_callback (AsyncCallData *data,
 	GSimpleAsyncResult *result = NULL;
 
 	if (error) {
-		GError *local_error = g_error_copy (error);
 		result = g_simple_async_result_new_from_error (G_OBJECT (data->miner),
 		                                               callback,
 		                                               data->user_data,
-		                                               local_error);
+		                                               (GError*) error);
 	} else {
 		result = g_simple_async_result_new (G_OBJECT (data->miner),
 		                                    callback,
@@ -789,11 +788,10 @@ run_query_callback (AsyncCallData *data,
 	GSimpleAsyncResult *result = NULL;
 
 	if (error) {
-		GError *local_error = g_error_copy (error);
 		result = g_simple_async_result_new_from_error (G_OBJECT (data->miner),
 		                                               callback,
 		                                               data->user_data,
-		                                               local_error);
+		                                               (GError*) error);
 	} else {
 		result = g_simple_async_result_new (G_OBJECT (data->miner),
 		                                    callback,



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