[tracker/grouped-deletes] libtracker-miner: Avoid use of already disposed memory
- From: Aleksander Morgado <aleksm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/grouped-deletes] libtracker-miner: Avoid use of already disposed memory
- Date: Wed, 9 Mar 2011 09:05:20 +0000 (UTC)
commit 67b9e04db1e042b3f0de6d804fb15679e10adb61
Author: Aleksander Morgado <aleksander lanedo com>
Date: Wed Mar 9 10:04:32 2011 +0100
libtracker-miner: Avoid use of already disposed memory
.../tracker-miner-fs-processing-pool.c | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
---
diff --git a/src/libtracker-miner/tracker-miner-fs-processing-pool.c b/src/libtracker-miner/tracker-miner-fs-processing-pool.c
index e2628eb..947a603 100644
--- a/src/libtracker-miner/tracker-miner-fs-processing-pool.c
+++ b/src/libtracker-miner/tracker-miner-fs-processing-pool.c
@@ -864,6 +864,7 @@ tracker_processing_pool_push_ready_task (TrackerProcessingPool
/* If buffering not requested, OR the limit of READY tasks is actually 1,
* flush previous buffer (if any) and then the new update */
if (!buffer || pool->limit[TRACKER_PROCESSING_TASK_STATUS_READY] == 1) {
+ BulkOperationMerge *operation = NULL;
const gchar *sparql = NULL;
trace ("(Processing Pool %s) Pushed READY/PROCESSING task %p for file '%s'",
@@ -889,8 +890,6 @@ tracker_processing_pool_push_ready_task (TrackerProcessingPool
} else if (task->content == CONTENT_SPARQL_BUILDER) {
sparql = tracker_sparql_builder_get_result (task->data.builder);
} else if (task->content == CONTENT_BULK_OPERATION) {
- BulkOperationMerge *operation;
-
operation = bulk_operation_merge_new (task->data.bulk.bulk_operation);
operation->tasks = g_list_prepend (NULL, task);
bulk_operation_merge_finish (operation);
@@ -898,8 +897,6 @@ tracker_processing_pool_push_ready_task (TrackerProcessingPool
if (operation->sparql) {
sparql = operation->sparql;
}
-
- bulk_operation_merge_free (operation);
}
if (sparql) {
@@ -911,6 +908,10 @@ tracker_processing_pool_push_ready_task (TrackerProcessingPool
task);
}
+ if (operation) {
+ bulk_operation_merge_free (operation);
+ }
+
return TRUE;
} else {
GFile *parent;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]